libtools/ToolObject.py:onSelectEvent(): obtain correct canvas map cell given transparent object selection cell.

This commit is contained in:
Lucio Andrés Illanes Albornoz 2019-09-14 10:49:11 +02:00
parent f65fe72cea
commit 243311c091
1 changed files with 2 additions and 2 deletions

View File

@ -102,8 +102,8 @@ class ToolObject(Tool):
dirty = False if isCursor else True
cellNew = self.objectMap[numRow][numCol]
if (cellNew[1] == -1) and (cellNew[3] == " "):
if (rectY < canvas.size[1]) and (rectX < canvas.size[0]):
cellNew = canvas.map[rectY][rectX]
if ((rectY + disp[1]) < canvas.size[1]) and ((rectX + disp[0]) < canvas.size[0]):
cellNew = canvas.map[rectY + disp[1]][rectX + disp[0]]
dispatchFn(eventDc, isCursor, [rectX + disp[0], rectY + disp[1], *cellNew], viewRect)
return dirty