mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Change MultiplyObjectsJob to work on a list of objects
This makes MultiplyObjectsJob able to handle a list of objects instead of a single object ID. Contributes to CURA-3609
This commit is contained in:
parent
97fd35c21d
commit
905e59354b
2 changed files with 39 additions and 28 deletions
|
@ -855,7 +855,14 @@ class CuraApplication(QtApplication):
|
|||
# \param min_offset minimum offset to other objects.
|
||||
@pyqtSlot("quint64", int)
|
||||
def multiplyObject(self, object_id, count, min_offset = 8):
|
||||
job = MultiplyObjectsJob(object_id, count, min_offset)
|
||||
node = self.getController().getScene().findObject(object_id)
|
||||
if not node:
|
||||
node = Selection.getSelectedObject(0)
|
||||
|
||||
while node.getParent() and node.getParent().callDecoration("isGroup"):
|
||||
node = node.getParent()
|
||||
|
||||
job = MultiplyObjectsJob([node], count, min_offset)
|
||||
job.start()
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue