From 26a50c36bc36a6503c790beda7986a59da845824 Mon Sep 17 00:00:00 2001 From: tzutalin Date: Thu, 25 May 2017 09:51:47 +0800 Subject: [PATCH] Update README --- README.rst | 2 ++ libs/canvas.py | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index cf8be16c..1663ada1 100644 --- a/README.rst +++ b/README.rst @@ -136,6 +136,8 @@ Hotkeys +------------+--------------------------------------------+ | Ctrl-- | Zoom out | +------------+--------------------------------------------+ +| ↑→↓← | Keyboard arrows to move selected rect box | ++------------+--------------------------------------------+ How to contribute ~~~~~~~~~~~~~~~~~ diff --git a/libs/canvas.py b/libs/canvas.py index b1cea058..a27a42e9 100644 --- a/libs/canvas.py +++ b/libs/canvas.py @@ -563,25 +563,25 @@ class Canvas(QWidget): def moveOnePixel(self, direction): # print(self.selectedShape.points) if direction == 'Left' and not self.moveOutOfBound(QPointF(-1.0, 0)): - print("move Left one pixel") + # print("move Left one pixel") self.selectedShape.points[0] += QPointF(-1.0, 0) self.selectedShape.points[1] += QPointF(-1.0, 0) self.selectedShape.points[2] += QPointF(-1.0, 0) self.selectedShape.points[3] += QPointF(-1.0, 0) elif direction == 'Right' and not self.moveOutOfBound(QPointF(1.0, 0)): - print("move Right one pixel") + # print("move Right one pixel") self.selectedShape.points[0] += QPointF(1.0, 0) self.selectedShape.points[1] += QPointF(1.0, 0) self.selectedShape.points[2] += QPointF(1.0, 0) self.selectedShape.points[3] += QPointF(1.0, 0) elif direction == 'Up' and not self.moveOutOfBound(QPointF(0, -1.0)): - print("move Up one pixel") + # print("move Up one pixel") self.selectedShape.points[0] += QPointF(0, -1.0) self.selectedShape.points[1] += QPointF(0, -1.0) self.selectedShape.points[2] += QPointF(0, -1.0) self.selectedShape.points[3] += QPointF(0, -1.0) elif direction == 'Down' and not self.moveOutOfBound(QPointF(0, 1.0)): - print("move Down one pixel") + # print("move Down one pixel") self.selectedShape.points[0] += QPointF(0, 1.0) self.selectedShape.points[1] += QPointF(0, 1.0) self.selectedShape.points[2] += QPointF(0, 1.0)