mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 22:39:02 +08:00
Fixed resetting to center of groups
Fixes #CURA-112
This commit is contained in:
parent
ee513b0b83
commit
56e8b01f22
@ -284,10 +284,10 @@ class CuraApplication(QtApplication):
|
||||
@pyqtSlot("quint64")
|
||||
def centerObject(self, object_id):
|
||||
node = self.getController().getScene().findObject(object_id)
|
||||
|
||||
if node.getParent() and node.getParent().callDecoration("isGroup"):
|
||||
node = node.getParent()
|
||||
if not node and object_id != 0: #Workaround for tool handles overlapping the selected object
|
||||
node = Selection.getSelectedObject(0)
|
||||
|
||||
if node:
|
||||
op = SetTransformOperation(node, Vector())
|
||||
op.push()
|
||||
@ -321,10 +321,9 @@ class CuraApplication(QtApplication):
|
||||
continue #Grouped nodes don't need resetting as their parent (the group) is resetted)
|
||||
|
||||
nodes.append(node)
|
||||
|
||||
print(nodes)
|
||||
if nodes:
|
||||
op = GroupedOperation()
|
||||
|
||||
for node in nodes:
|
||||
op.addOperation(SetTransformOperation(node, Vector()))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user