Draft: Do not move children of App::Link objects

This caused the original object to be moved when using the Draft move
tool to move a link object, when the original object has MoveWithHost
set (e.g. a Window). There was already a similar exception for clones,
so it makes sense to extend this for links too.

Note that there seem to be more problems with the "MoveWithHost"
mechanism and fixing them might completely refactor this code, but until
then, this is a simple and targeted fix that at least makes moving
links to windows work as expected.

See https://forum.freecadweb.org/viewtopic.php?f=23&t=57223 for
discussion of this bug, its fix and the additional problems mentioned.
This commit is contained in:
Matthijs Kooijman
2021-05-22 16:29:50 +02:00
parent 089b2ae478
commit 19ada8fd1f

View File

@@ -297,7 +297,7 @@ def get_movable_children(objectslist, recursive=True):
for obj in objectslist:
# Skips some objects that should never move their children
if utils.get_type(obj) not in ("Clone", "SectionPlane",
"Facebinder", "BuildingPart"):
"Facebinder", "BuildingPart", "App::Link"):
children = obj.OutList
if (hasattr(obj, "Proxy") and obj.Proxy
and hasattr(obj.Proxy, "getSiblings")