From 4d4ce6f86ec3cdbc685346853829e2435ce014a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Mon, 16 Sep 2019 11:23:47 +0200 Subject: [PATCH] libroar/RoarCanvasCommandsTools.py:canvasTool(): call dropTarget.done() when setting new tool from external object as current tool. --- libroar/RoarCanvasCommandsTools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libroar/RoarCanvasCommandsTools.py b/libroar/RoarCanvasCommandsTools.py index 9b71edb..665d383 100644 --- a/libroar/RoarCanvasCommandsTools.py +++ b/libroar/RoarCanvasCommandsTools.py @@ -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()