From 4d729871d3e56db97e67efaeb764d2c6fee6b374 Mon Sep 17 00:00:00 2001 From: Roy-043 Date: Sun, 23 Jun 2024 11:33:58 +0200 Subject: [PATCH] BIM: fix SwitchWB preference by switching to BIM WB Fixes #14680. --- src/Mod/BIM/Resources/ui/preferencesNativeIFC.ui | 4 ++-- src/Mod/BIM/nativeifc/ifc_import.py | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Mod/BIM/Resources/ui/preferencesNativeIFC.ui b/src/Mod/BIM/Resources/ui/preferencesNativeIFC.ui index ee82057438..8699afcea0 100644 --- a/src/Mod/BIM/Resources/ui/preferencesNativeIFC.ui +++ b/src/Mod/BIM/Resources/ui/preferencesNativeIFC.ui @@ -100,10 +100,10 @@ - If this is checked, the workbench specified in Start preferences will be loaded after import + If this is checked, the BIM workbench will be loaded after import - Switch workbench after import + Switch to BIM workbench after import SwitchWB diff --git a/src/Mod/BIM/nativeifc/ifc_import.py b/src/Mod/BIM/nativeifc/ifc_import.py index 7c4792cf3c..10ee53fb10 100644 --- a/src/Mod/BIM/nativeifc/ifc_import.py +++ b/src/Mod/BIM/nativeifc/ifc_import.py @@ -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