From 496e4c7a4bd2efd0fb5896405166bf647f0d08ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Fri, 5 Jan 2018 03:27:57 +0100 Subject: [PATCH] MiRCART.py:MiRCARTToolRect.__processMapPatches(): always obtain cell state from canvasMap. MiRCART.py:MiRCARTToolRect._draw(): always paint w/ background colour given isRightDown. --- MiRCART.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/MiRCART.py b/MiRCART.py index 5b4ed7b..1b51b02 100755 --- a/MiRCART.py +++ b/MiRCART.py @@ -96,13 +96,16 @@ class MiRCARTCanvas(wx.Panel): mapPatchTmp = mapPatch[0]; mapPatchW = mapPatch[1]; mapPatchH = mapPatch[2]; if mapPatchTmp and self.patchesTmp: for patch in self.patchesTmp: + patch[2] = self.canvasMap[patch[1]][patch[0]][0] + patch[3] = self.canvasMap[patch[1]][patch[0]][1] + patch[4] = self.canvasMap[patch[1]][patch[0]][2] self._drawPatch(patch, eventDc, tmpDc, 0, 0) self.patchesTmp = [] for patch in mapPatch[3]: if mapPatchTmp: mapItem = self.canvasMap[atY + patch[1]][atX + patch[0]] - self.patchesTmp.append((atX + patch[0], \ - atY + patch[1], mapItem[0], mapItem[1], mapItem[2])) + self.patchesTmp.append([atX + patch[0], \ + atY + patch[1], None, None, None]) self._drawPatch(patch, eventDc, tmpDc, atX, atY) else: mapItem = self.canvasMap[atY + patch[1]][atX + patch[0]] @@ -243,8 +246,8 @@ class MiRCARTToolRect(MiRCARTTool): self.parentCanvas.getBackgroundColour(), \ self.parentCanvas.getBackgroundColour(), " "]]], \ [True, 1, 1, [[0, 0, \ - self.parentCanvas.getForegroundColour(), \ - self.parentCanvas.getForegroundColour(), " "]]]] + self.parentCanvas.getBackgroundColour(), \ + self.parentCanvas.getBackgroundColour(), " "]]]] else: return [[True, 1, 1, [[0, 0, \ self.parentCanvas.getForegroundColour(), \