BIM: fix SwitchWB preference by switching to BIM WB

Fixes #14680.
This commit is contained in:
Roy-043
2024-06-23 11:33:58 +02:00
committed by Yorik van Havre
parent 977b20d603
commit 4d729871d3
2 changed files with 3 additions and 5 deletions

View File

@@ -100,10 +100,10 @@
<item>
<widget class="Gui::PrefCheckBox" name="checkBox_3">
<property name="toolTip">
<string>If this is checked, the workbench specified in Start preferences will be loaded after import</string>
<string>If this is checked, the BIM workbench will be loaded after import</string>
</property>
<property name="text">
<string>Switch workbench after import</string>
<string>Switch to BIM workbench after import</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>SwitchWB</cstring>

View File

@@ -111,9 +111,7 @@ def insert(
fsize = round(os.path.getsize(filename) / 1048576, 2)
print("Imported", os.path.basename(filename), "(", fsize, "Mb ) in", endtime)
if FreeCAD.GuiUp and switchwb:
from StartPage import StartPage
StartPage.postStart()
FreeCADGui.activateWorkbench("BIMWorkbench")
return document