mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Move duplicated modifier meshes a bit after duplication
This makes sure that they are visible / selectable after multiplication CURA-7851
This commit is contained in:
parent
4ce69a9eb5
commit
4aae3d7e2e
1 changed files with 6 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue