Draft: Fixed wrong moving of BuildingParts

This commit is contained in:
Yorik van Havre
2018-11-28 16:51:02 -02:00
parent 0de83e8b90
commit 03e7083dd5
2 changed files with 3 additions and 6 deletions

View File

@@ -305,9 +305,6 @@ class Snapper:
if Draft.getType(obj) == "Polygon":
# special snapping for polygons: add the center
snaps.extend(self.snapToPolygon(obj))
elif Draft.getType(obj) == "BuildingPart":
# special snapping for Arch building parts: add the location
snaps.append([obj.Placement.Base,'endpoint',self.toWP(obj.Pacement.Base)])
if (not self.maxEdges) or (len(shape.Edges) <= self.maxEdges):
if "Edge" in comp:
@@ -361,8 +358,8 @@ class Snapper:
# for points we only snap to points
snaps.extend(self.snapToEndpoints(obj.Points))
elif Draft.getType(obj) == "WorkingPlaneProxy":
# snap to the center of WPProxies
elif Draft.getType(obj) in ["WorkingPlaneProxy","BuildingPart"]:
# snap to the center of WPProxies and BuildingParts
snaps.append([obj.Placement.Base,'endpoint',self.toWP(obj.Placement.Base)])
# updating last objects list

View File

@@ -2360,7 +2360,7 @@ class Move(Modifier):
# testing for special case: only Arch groups in selection
onlyarchgroups = True
for o in self.sel:
if not(Draft.getType(o) in ["Floor","Building","Site"]):
if not(Draft.getType(o) in ["Floor","BuildingPart","Building","Site"]):
onlyarchgroups = False
if not onlyarchgroups:
# arch groups can be moved, no need to add their children