From a68d96fb60202a71731e4fdbdc9675f6f602b962 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 16 Nov 2016 09:42:04 +0100 Subject: [PATCH] Per model settings panel is now closed when the tool gets disabled. CURA-2287 --- cura/CuraApplication.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 80fee88201..da1a0688e2 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -573,11 +573,17 @@ class CuraApplication(QtApplication): def onSelectionChanged(self): if Selection.hasSelection(): - if not self.getController().getActiveTool(): + if self.getController().getActiveTool(): + # If the tool has been disabled by the new selection + if not self.getController().getActiveTool().getEnabled(): + # Default + self.getController().setActiveTool("TranslateTool") + else: if self._previous_active_tool: self.getController().setActiveTool(self._previous_active_tool) self._previous_active_tool = None else: + # Default self.getController().setActiveTool("TranslateTool") if Preferences.getInstance().getValue("view/center_on_select"): self._center_after_select = True