Arch: Fixed bug that builds a structure on top of another structure
This commit is contained in:
parent
1e860356e7
commit
dceed60c98
|
@ -352,6 +352,7 @@ class _CommandStructure:
|
||||||
self.continueCmd = False
|
self.continueCmd = False
|
||||||
sel = FreeCADGui.Selection.getSelection()
|
sel = FreeCADGui.Selection.getSelection()
|
||||||
if sel:
|
if sel:
|
||||||
|
if Draft.getType(sel[0]) != "Structure":
|
||||||
# direct creation
|
# direct creation
|
||||||
FreeCAD.ActiveDocument.openTransaction(str(translate("Arch","Create Structure")))
|
FreeCAD.ActiveDocument.openTransaction(str(translate("Arch","Create Structure")))
|
||||||
FreeCADGui.doCommand("import Arch")
|
FreeCADGui.doCommand("import Arch")
|
||||||
|
@ -366,7 +367,8 @@ class _CommandStructure:
|
||||||
FreeCADGui.doCommand("Arch.makeStructure(FreeCAD.ActiveDocument." + obj.Name + ")")
|
FreeCADGui.doCommand("Arch.makeStructure(FreeCAD.ActiveDocument." + obj.Name + ")")
|
||||||
FreeCAD.ActiveDocument.commitTransaction()
|
FreeCAD.ActiveDocument.commitTransaction()
|
||||||
FreeCAD.ActiveDocument.recompute()
|
FreeCAD.ActiveDocument.recompute()
|
||||||
else:
|
return
|
||||||
|
|
||||||
# interactive mode
|
# interactive mode
|
||||||
if hasattr(FreeCAD,"DraftWorkingPlane"):
|
if hasattr(FreeCAD,"DraftWorkingPlane"):
|
||||||
FreeCAD.DraftWorkingPlane.setup()
|
FreeCAD.DraftWorkingPlane.setup()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user