mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
Maintain a selection when removing a mesh, so the tool stays active
This commit is contained in:
parent
83168886d6
commit
78a7299fc5
1 changed files with 7 additions and 0 deletions
|
@ -126,9 +126,16 @@ class SupportEraser(Tool):
|
||||||
Application.getInstance().getController().getScene().sceneChanged.emit(node)
|
Application.getInstance().getController().getScene().sceneChanged.emit(node)
|
||||||
|
|
||||||
def _removeEraserMesh(self, node: CuraSceneNode):
|
def _removeEraserMesh(self, node: CuraSceneNode):
|
||||||
|
parent = node.getParent()
|
||||||
|
if parent == self._controller.getScene().getRoot():
|
||||||
|
parent = None
|
||||||
|
|
||||||
op = RemoveSceneNodeOperation(node)
|
op = RemoveSceneNodeOperation(node)
|
||||||
op.push()
|
op.push()
|
||||||
|
|
||||||
|
if parent and not Selection.isSelected(parent):
|
||||||
|
Selection.add(parent)
|
||||||
|
|
||||||
Application.getInstance().getController().getScene().sceneChanged.emit(node)
|
Application.getInstance().getController().getScene().sceneChanged.emit(node)
|
||||||
|
|
||||||
def _updateEnabled(self):
|
def _updateEnabled(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue