2019-09-01 14:34:00 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
#
|
|
|
|
# MiRCARTToolSelectClone.py -- XXX
|
|
|
|
# Copyright (c) 2018 Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de>
|
|
|
|
#
|
|
|
|
|
|
|
|
from MiRCARTToolSelect import MiRCARTToolSelect
|
|
|
|
|
|
|
|
class MiRCARTToolSelectClone(MiRCARTToolSelect):
|
|
|
|
"""XXX"""
|
|
|
|
name = "Clone selection"
|
|
|
|
|
|
|
|
#
|
2019-09-03 13:48:48 +00:00
|
|
|
# onSelectEvent(self, disp, dispatchFn, eventDc, isCursor, newToolRect, selectRect): XXX
|
|
|
|
def onSelectEvent(self, disp, dispatchFn, eventDc, isCursor, newToolRect, selectRect):
|
2019-09-01 14:34:00 +00:00
|
|
|
for numRow in range(len(self.toolSelectMap)):
|
|
|
|
for numCol in range(len(self.toolSelectMap[numRow])):
|
|
|
|
cellOld = self.toolSelectMap[numRow][numCol]
|
2019-09-03 13:48:48 +00:00
|
|
|
rectX, rectY = selectRect[0][0] + numCol, selectRect[0][1] + numRow
|
|
|
|
dispatchFn(eventDc, isCursor, [rectX + disp[0], rectY + disp[1], *cellOld])
|
2019-09-01 14:34:00 +00:00
|
|
|
|
|
|
|
# vim:expandtab foldmethod=marker sw=4 ts=4 tw=120
|