BIM: Update WP commands

Update the BIM WP commands to use the new Draft code. This ensures correct GUI behavior.

This also fixes the BIM_SetWPSide command which would align to the left side instead of the right side. The right side matches the behavior of Draft_SelectPlane and also the icon of the command.
This commit is contained in:
Roy-043
2024-06-04 09:21:43 +02:00
committed by Yorik van Havre
parent 5935cba69a
commit 3ef99e8b83

View File

@@ -43,7 +43,8 @@ class BIM_SetWPFront:
}
def Activated(self):
FreeCADGui.doCommandGui("FreeCAD.DraftWorkingPlane.setFront()")
FreeCADGui.addModule("WorkingPlane")
FreeCADGui.doCommand("WorkingPlane.get_working_plane(update=False).set_to_front()")
class BIM_SetWPSide:
@@ -59,7 +60,8 @@ class BIM_SetWPSide:
}
def Activated(self):
FreeCADGui.doCommandGui("FreeCAD.DraftWorkingPlane.setSide()")
FreeCADGui.addModule("WorkingPlane")
FreeCADGui.doCommand("WorkingPlane.get_working_plane(update=False).set_to_side()")
class BIM_SetWPTop:
@@ -75,7 +77,8 @@ class BIM_SetWPTop:
}
def Activated(self):
FreeCADGui.doCommandGui("FreeCAD.DraftWorkingPlane.setTop()")
FreeCADGui.addModule("WorkingPlane")
FreeCADGui.doCommand("WorkingPlane.get_working_plane(update=False).set_to_top()")
class BIM_WPView: