mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-03 15:51:12 -07:00
Fixed delete selection issues.
CURA-616
This commit is contained in:
parent
f65c848944
commit
3523b709c4
2 changed files with 15 additions and 5 deletions
|
|
@ -281,7 +281,20 @@ class CuraApplication(QtApplication):
|
|||
def jobName(self):
|
||||
return self._job_name
|
||||
|
||||
## Remove an object from the scene
|
||||
# Remove all selected objects from the scene.
|
||||
@pyqtSlot()
|
||||
def deleteSelection(self):
|
||||
op = GroupedOperation()
|
||||
nodes = Selection.getAllSelectedObjects()
|
||||
for node in nodes:
|
||||
op.addOperation(RemoveSceneNodeOperation(node))
|
||||
|
||||
op.push()
|
||||
|
||||
pass
|
||||
|
||||
## Remove an object from the scene.
|
||||
# Note that this only removes an object if it is selected.
|
||||
@pyqtSlot("quint64")
|
||||
def deleteObject(self, object_id):
|
||||
node = self.getController().getScene().findObject(object_id)
|
||||
|
|
|
|||
|
|
@ -518,10 +518,7 @@ UM.MainWindow
|
|||
|
||||
deleteSelection.onTriggered:
|
||||
{
|
||||
if(objectContextMenu.objectId != 0)
|
||||
{
|
||||
Printer.deleteObject(objectContextMenu.objectId);
|
||||
}
|
||||
Printer.deleteSelection()
|
||||
}
|
||||
|
||||
deleteObject.onTriggered:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue