mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-26 08:56:36 +00:00
Only allow setting selection w/ <Esc> post-selection.
This commit is contained in:
parent
7ed4d5f49d
commit
81e8098f1e
@ -102,7 +102,8 @@ class ToolObject(Tool):
|
|||||||
|
|
||||||
def onKeyboardEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyChar, keyCode, keyModifiers, mapPoint):
|
def onKeyboardEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyChar, keyCode, keyModifiers, mapPoint):
|
||||||
rc, dirty = False, False
|
rc, dirty = False, False
|
||||||
if ord(keyChar) == wx.WXK_ESCAPE:
|
if (ord(keyChar) == wx.WXK_ESCAPE) \
|
||||||
|
and (self.toolState >= self.TS_SELECT):
|
||||||
dirty = self.onSelectEvent(canvas, (0, 0), dispatchFn, eventDc, False, keyModifiers, self.targetRect.copy(), self.targetRect)
|
dirty = self.onSelectEvent(canvas, (0, 0), dispatchFn, eventDc, False, keyModifiers, self.targetRect.copy(), self.targetRect)
|
||||||
self._drawSelectRect(self.targetRect, dispatchFn, eventDc)
|
self._drawSelectRect(self.targetRect, dispatchFn, eventDc)
|
||||||
self.objectMap, self.objectSize, self.targetRect, self.toolState = None, None, None, self.TS_NONE
|
self.objectMap, self.objectSize, self.targetRect, self.toolState = None, None, None, self.TS_NONE
|
||||||
|
Loading…
Reference in New Issue
Block a user