[Gui] Show Preferences page by name rather than index

This commit is contained in:
Syres916
2024-12-13 07:09:16 +00:00
committed by Chris Hennes
parent 8d110b3b0b
commit 74abfd39d9
7 changed files with 73 additions and 9 deletions

View File

@@ -111,7 +111,7 @@ def getPreferences():
import ifcopenshell
if FreeCAD.GuiUp and params.get_param_arch("ifcShowDialog"):
FreeCADGui.showPreferences("Import-Export", 1)
FreeCADGui.showPreferencesByName("Import-Export", ":/ui/preferences-ifc-export.ui")
ifcunit = params.get_param_arch("ifcUnit")
# Factor to multiply the dimension in millimeters

View File

@@ -84,7 +84,7 @@ def getPreferences():
3 = One compound per storey
"""
if FreeCAD.GuiUp and params.get_param_arch("ifcShowDialog"):
Gui.showPreferences("Import-Export", 0)
Gui.showPreferencesByName("Import-Export", ":/ui/preferences-ifc.ui")
preferences = {
'DEBUG': params.get_param_arch("ifcDebug"),

View File

@@ -4148,7 +4148,7 @@ def readPreferences():
"""
# reading parameters
if gui and params.get_param("dxfShowDialog"):
FreeCADGui.showPreferences("Import-Export", 3)
FreeCADGui.showPreferencesByName("Import-Export", ":/ui/preferences-dxf.ui")
global dxfCreatePart, dxfCreateDraft, dxfCreateSketch
global dxfDiscretizeCurves, dxfStarBlocks
global dxfMakeBlocks, dxfJoin, dxfRenderPolylineWidth