mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Disable Support Eraser if anti_overhang_mesh is disabled
This commit is contained in:
parent
a536da503b
commit
7e4cb1c36e
1 changed files with 11 additions and 0 deletions
|
@ -24,6 +24,8 @@ class SupportEraser(Tool):
|
||||||
self._shortcut_key = Qt.Key_G
|
self._shortcut_key = Qt.Key_G
|
||||||
self._controller = Application.getInstance().getController()
|
self._controller = Application.getInstance().getController()
|
||||||
|
|
||||||
|
Application.getInstance().globalContainerStackChanged.connect(self._updateEnabled)
|
||||||
|
|
||||||
def event(self, event):
|
def event(self, event):
|
||||||
super().event(event)
|
super().event(event)
|
||||||
|
|
||||||
|
@ -73,3 +75,12 @@ class SupportEraser(Tool):
|
||||||
op = AddSceneNodeOperation(node, scene.getRoot())
|
op = AddSceneNodeOperation(node, scene.getRoot())
|
||||||
op.push()
|
op.push()
|
||||||
Application.getInstance().getController().getScene().sceneChanged.emit(node)
|
Application.getInstance().getController().getScene().sceneChanged.emit(node)
|
||||||
|
|
||||||
|
def _updateEnabled(self):
|
||||||
|
plugin_enabled = False
|
||||||
|
|
||||||
|
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||||
|
if global_container_stack:
|
||||||
|
plugin_enabled = global_container_stack.getProperty("anti_overhang_mesh", "enabled")
|
||||||
|
|
||||||
|
Application.getInstance().getController().toolEnabledChanged.emit(self._plugin_id, plugin_enabled)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue