From 4aae3d7e2e782fbf53ec8e1e04a7774145e1a77d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 6 Oct 2021 15:57:18 +0200 Subject: [PATCH] Move duplicated modifier meshes a bit after duplication This makes sure that they are visible / selectable after multiplication CURA-7851 --- cura/MultiplyObjectsJob.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cura/MultiplyObjectsJob.py b/cura/MultiplyObjectsJob.py index 5df02df288..2bbafc2015 100644 --- a/cura/MultiplyObjectsJob.py +++ b/cura/MultiplyObjectsJob.py @@ -6,9 +6,11 @@ from typing import List from UM.Application import Application from UM.Job import Job +from UM.Math.Vector import Vector from UM.Message import Message from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation from UM.Operations.GroupedOperation import GroupedOperation +from UM.Operations.TranslateOperation import TranslateOperation from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Scene.SceneNode import SceneNode from UM.i18n import i18nCatalog @@ -84,6 +86,10 @@ class MultiplyObjectsJob(Job): if nodes_to_add_without_arrange: for nested_node in nodes_to_add_without_arrange: group_operation.addOperation(AddSceneNodeOperation(nested_node, nested_node.getParent())) + # Move the node a tiny bit so it doesn't overlap with the existing one. + # This doesn't fix it if someone creates more than one duplicate, but it at least shows that something + # happened (and after moving it, it's clear that there are more underneath) + group_operation.addOperation(TranslateOperation(nested_node, Vector(2.5, 2.5, 2.5))) group_operation.redo() status_message.hide()