From 3ef99e8b83649ea62f0bd63f243ac3251ff2cdc6 Mon Sep 17 00:00:00 2001 From: Roy-043 Date: Tue, 4 Jun 2024 09:21:43 +0200 Subject: [PATCH] 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. --- src/Mod/BIM/bimcommands/BimWPCommands.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Mod/BIM/bimcommands/BimWPCommands.py b/src/Mod/BIM/bimcommands/BimWPCommands.py index c998caf050..bc1e66833b 100644 --- a/src/Mod/BIM/bimcommands/BimWPCommands.py +++ b/src/Mod/BIM/bimcommands/BimWPCommands.py @@ -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: