From f41b0624678e26a2efed7cb708d9c9a5b9118aea Mon Sep 17 00:00:00 2001 From: Syres916 <46537884+Syres916@users.noreply.github.com> Date: Tue, 4 Jul 2023 14:16:18 +0100 Subject: [PATCH] [Start] LoadCustom update conditionals --- src/Mod/Start/StartPage/LoadCustom.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Mod/Start/StartPage/LoadCustom.py b/src/Mod/Start/StartPage/LoadCustom.py index d8c3118cde..e491fdc005 100644 --- a/src/Mod/Start/StartPage/LoadCustom.py +++ b/src/Mod/Start/StartPage/LoadCustom.py @@ -42,6 +42,14 @@ if cfolders: "DefaultImport" + ext, "" ) if ( + ext.lower() == "fcstd" + or ext.lower() == "step" + or ext.lower() == "stp" + or ext.lower() == "iges" + or ext.lower() == "igs" + ): + FreeCAD.loadFile(os.path.join(cfolder, f), mod) + elif ( ext.lower() == "bmp" or ext.lower() == "cur" or ext.lower() == "gif" @@ -57,11 +65,12 @@ if cfolders: or ext.lower() == "xbm" or ext.lower() == "xpm" ): - App.newDocument() - FreeCADGui.insert(os.path.join(cfolder, f), App.activeDocument().Name) - App.activeDocument().recompute() + FreeCAD.newDocument() + FreeCADGui.insert(os.path.join(cfolder, f), FreeCAD.activeDocument().Name) + FreeCAD.activeDocument().recompute() else: - FreeCAD.loadFile(os.path.join(cfolder, f), mod) + FreeCADGui.loadFile(os.path.join(cfolder, f), mod) + FreeCADGui.activeDocument().sendMsgToViews("ViewFit") FreeCADGui.activeDocument().sendMsgToViews("ViewFit") from StartPage import StartPage