mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-22 07:16:38 +00:00
libroar/RoarCanvasCommandsTools.py:canvasTool(): call dropTarget.done() when setting new tool from external object as current tool.
This commit is contained in:
parent
5ad678bf4c
commit
c93c8dd8b0
@ -24,6 +24,10 @@ class RoarCanvasCommandsTools():
|
||||
@GuiSelectDecorator(6, "Text", "&Text", ["toolText.png"], [wx.ACCEL_CTRL, ord("T")], False)
|
||||
def canvasTool(self, f, idx):
|
||||
def canvasTool_(event):
|
||||
if (self.currentTool.__class__ == ToolObject) \
|
||||
and (self.currentTool.toolState > self.currentTool.TS_NONE) \
|
||||
and self.currentTool.external:
|
||||
self.parentCanvas.dropTarget.done()
|
||||
self.lastTool, self.currentTool = self.currentTool, [ToolCircle, None, ToolFill, ToolLine, ToolObject, ToolRect, ToolText][idx]
|
||||
if self.currentTool != None:
|
||||
self.currentTool = self.currentTool()
|
||||
|
Loading…
Reference in New Issue
Block a user