mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-22 15:26:37 +00:00
libtools/ToolObject.py:onSelectEvent(): obtain correct canvas map cell given transparent object selection cell.
This commit is contained in:
parent
f65fe72cea
commit
243311c091
@ -102,8 +102,8 @@ class ToolObject(Tool):
|
|||||||
dirty = False if isCursor else True
|
dirty = False if isCursor else True
|
||||||
cellNew = self.objectMap[numRow][numCol]
|
cellNew = self.objectMap[numRow][numCol]
|
||||||
if (cellNew[1] == -1) and (cellNew[3] == " "):
|
if (cellNew[1] == -1) and (cellNew[3] == " "):
|
||||||
if (rectY < canvas.size[1]) and (rectX < canvas.size[0]):
|
if ((rectY + disp[1]) < canvas.size[1]) and ((rectX + disp[0]) < canvas.size[0]):
|
||||||
cellNew = canvas.map[rectY][rectX]
|
cellNew = canvas.map[rectY + disp[1]][rectX + disp[0]]
|
||||||
dispatchFn(eventDc, isCursor, [rectX + disp[0], rectY + disp[1], *cellNew], viewRect)
|
dispatchFn(eventDc, isCursor, [rectX + disp[0], rectY + disp[1], *cellNew], viewRect)
|
||||||
return dirty
|
return dirty
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user