From d8f8f4754356a942e343885cfa2a5128d3bfd7f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Thu, 11 Jan 2018 00:59:07 +0100 Subject: [PATCH] MiRCARTCanvasInterface.py: sync menu item state when selecting tool. --- MiRCARTCanvasInterface.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MiRCARTCanvasInterface.py b/MiRCARTCanvasInterface.py index 9cc77ce..1e29ff1 100644 --- a/MiRCARTCanvasInterface.py +++ b/MiRCARTCanvasInterface.py @@ -263,36 +263,43 @@ class MiRCARTCanvasInterface(): # {{{ canvasToolCircle(self, event): XXX def canvasToolCircle(self, event): self.canvasTool = MiRCARTToolCircle(self.parentCanvas) + self.parentFrame.menuItemsById[self.parentFrame.CID_CIRCLE[0]].Check(True) self.parentFrame.onCanvasUpdate(toolName=self.canvasTool.name) # }}} # {{{ canvasToolFill(self, event): XXX def canvasToolFill(self, event): self.canvasTool = MiRCARTToolFill(self.parentCanvas) + self.parentFrame.menuItemsById[self.parentFrame.CID_FILL[0]].Check(True) self.parentFrame.onCanvasUpdate(toolName=self.canvasTool.name) # }}} # {{{ canvasToolLine(self, event): XXX def canvasToolLine(self, event): self.canvasTool = MiRCARTToolLine(self.parentCanvas) + self.parentFrame.menuItemsById[self.parentFrame.CID_LINE[0]].Check(True) self.parentFrame.onCanvasUpdate(toolName=self.canvasTool.name) # }}} # {{{ canvasToolSelectClone(self, event): XXX def canvasToolSelectClone(self, event): self.canvasTool = MiRCARTToolSelectClone(self.parentCanvas) + self.parentFrame.menuItemsById[self.parentFrame.CID_CLONE_SELECT[0]].Check(True) self.parentFrame.onCanvasUpdate(toolName=self.canvasTool.name) # }}} # {{{ canvasToolSelectMove(self, event): XXX def canvasToolSelectMove(self, event): self.canvasTool = MiRCARTToolSelectMove(self.parentCanvas) + self.parentFrame.menuItemsById[self.parentFrame.CID_MOVE_SELECT[0]].Check(True) self.parentFrame.onCanvasUpdate(toolName=self.canvasTool.name) # }}} # {{{ canvasToolRect(self, event): XXX def canvasToolRect(self, event): self.canvasTool = MiRCARTToolRect(self.parentCanvas) + self.parentFrame.menuItemsById[self.parentFrame.CID_RECT[0]].Check(True) self.parentFrame.onCanvasUpdate(toolName=self.canvasTool.name) # }}} # {{{ canvasToolText(self, event): XXX def canvasToolText(self, event): self.canvasTool = MiRCARTToolText(self.parentCanvas) + self.parentFrame.menuItemsById[self.parentFrame.CID_TEXT[0]].Check(True) self.parentFrame.onCanvasUpdate(toolName=self.canvasTool.name) # }}} # {{{ canvasUndo(self, event): XXX