mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-10-10 07:17:52 -06: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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue