From e763dc8909173c0a4d265ff7ed18c2a4e48b960a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Mon, 8 Jan 2018 01:18:52 +0100 Subject: [PATCH] MiRCARTFrame.py:MiRCARTFrame.onFrameCommand(): don't decrease brush size below (1,1). MiRCARTFrame.py:MiRCARTFrame.onFrameCommand(): remove debugging print()s. --- MiRCARTFrame.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/MiRCARTFrame.py b/MiRCARTFrame.py index 368d9c0..23b2e9c 100644 --- a/MiRCARTFrame.py +++ b/MiRCARTFrame.py @@ -340,14 +340,13 @@ class MiRCARTFrame(MiRCARTGeneralFrame): elif cid == self.CID_DELETE[0]: pass elif cid == self.CID_INCRBRUSH[0]: - self.panelCanvas.brushSize = \ + self.panelCanvas.brushSize = \ [a+1 for a in self.panelCanvas.brushSize] - print(self.panelCanvas.brushSize) - elif cid == self.CID_DECRBRUSH[0] \ - and self.panelCanvas.brushSize != [0,0]: - self.panelCanvas.brushSize = \ + elif cid == self.CID_DECRBRUSH[0] \ + and self.panelCanvas.brushSize[0] > 1 \ + and self.panelCanvas.brushSize[1] > 1: + self.panelCanvas.brushSize = \ [a-1 for a in self.panelCanvas.brushSize] - print(self.panelCanvas.brushSize) elif cid == self.CID_SOLID_BRUSH[0]: pass elif cid == self.CID_RECT[0]: @@ -356,7 +355,7 @@ class MiRCARTFrame(MiRCARTGeneralFrame): pass elif cid == self.CID_LINE[0]: pass - elif cid >= self.CID_COLOUR00[0] \ + elif cid >= self.CID_COLOUR00[0] \ and cid <= self.CID_COLOUR15[0]: numColour = cid - self.CID_COLOUR00[0] if event.GetEventType() == wx.wxEVT_TOOL: