BIM: store Classification prefix setting

This commit is contained in:
Roy-043
2025-07-09 15:44:41 +02:00
committed by Yorik van Havre
parent 5fa2d62f6c
commit 2e4e661594

View File

@@ -74,6 +74,7 @@ class BIM_Classification:
# restore saved values
self.form.onlyVisible.setChecked(PARAMS.GetInt("BimClassificationVisibleState", 0))
self.form.checkPrefix.setChecked(PARAMS.GetInt("BimClassificationSystemNamePrefix", 1))
w = PARAMS.GetInt("BimClassificationDialogWidth", 629)
h = PARAMS.GetInt("BimClassificationDialogHeight", 516)
self.form.resize(w, h)
@@ -161,9 +162,10 @@ class BIM_Classification:
self.form.search.down.connect(self.onDownArrow)
if hasattr(self.form.onlyVisible, "checkStateChanged"): # Qt version >= 6.7.0
self.form.onlyVisible.checkStateChanged.connect(self.onVisible)
self.form.checkPrefix.checkStateChanged.connect(self.onPrefix)
else: # Qt version < 6.7.0
self.form.onlyVisible.stateChanged.connect(self.onVisible)
self.form.checkPrefix.stateChanged.connect(self.onPrefix)
# center the dialog over FreeCAD window
mw = FreeCADGui.getMainWindow()
self.form.move(
@@ -673,6 +675,9 @@ class BIM_Classification:
PARAMS.SetInt("BimClassificationVisibleState", getattr(index, "value", index))
self.updateObjects()
def onPrefix(self, index):
PARAMS.SetInt("BimClassificationSystemNamePrefix", getattr(index, "value", index))
def getIcon(self,obj):
"""returns a QIcon for an object"""