MiRCARTToolSelectMove.py: clear source region prior to moving.

This commit is contained in:
Lucio Andrés Illanes Albornoz 2018-01-10 19:20:35 +01:00
parent 7e7df8a31c
commit 5fd20d31b1

View File

@ -48,12 +48,15 @@ class MiRCARTToolSelectMove(MiRCARTToolSelect):
disp = [0, 0] disp = [0, 0]
newToolRect = selectRect.copy() newToolRect = selectRect.copy()
isCursor = True isCursor = True
for numRow in range(len(self.toolSelectMap)):
for numCol in range(len(self.toolSelectMap[numRow])):
dispatchFn(eventDc, isCursor, [[self.srcRect[0] + numCol, \
self.srcRect[1] + numRow], [1, 1], 0, " "])
for numRow in range(len(self.toolSelectMap)): for numRow in range(len(self.toolSelectMap)):
for numCol in range(len(self.toolSelectMap[numRow])): for numCol in range(len(self.toolSelectMap[numRow])):
cellOld = self.toolSelectMap[numRow][numCol] cellOld = self.toolSelectMap[numRow][numCol]
rectY = selectRect[0][1] + numRow rectY = selectRect[0][1] + numRow
rectX = selectRect[0][0] + numCol rectX = selectRect[0][0] + numCol
dispatchFn(eventDc, isCursor, [[self.srcRect[0] + numCol, self.srcRect[1] + numRow], [1, 1], 0, " "])
dispatchFn(eventDc, isCursor, [[rectX+disp[0], rectY+disp[1]], *cellOld]) dispatchFn(eventDc, isCursor, [[rectX+disp[0], rectY+disp[1]], *cellOld])
self._drawSelectRect(newToolRect, dispatchFn, eventDc) self._drawSelectRect(newToolRect, dispatchFn, eventDc)
self.toolRect = newToolRect self.toolRect = newToolRect