mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 03:55:56 +08:00
Fixed delete selection issues.
CURA-616
This commit is contained in:
parent
f65c848944
commit
3523b709c4
@ -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…
x
Reference in New Issue
Block a user