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:
Arjen Hiemstra 2017-04-20 17:25:05 +02:00
parent 97fd35c21d
commit 905e59354b
2 changed files with 39 additions and 28 deletions

View file

@ -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