From 2e4e661594b23b56a75f1f713fbe3035b48b9b77 Mon Sep 17 00:00:00 2001 From: Roy-043 <70520633+Roy-043@users.noreply.github.com> Date: Wed, 9 Jul 2025 15:44:41 +0200 Subject: [PATCH] BIM: store Classification prefix setting --- src/Mod/BIM/bimcommands/BimClassification.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Mod/BIM/bimcommands/BimClassification.py b/src/Mod/BIM/bimcommands/BimClassification.py index 445ae2ea6b..18853365d9 100644 --- a/src/Mod/BIM/bimcommands/BimClassification.py +++ b/src/Mod/BIM/bimcommands/BimClassification.py @@ -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"""