From e2bab72bb5637bfb899c7e3d7bb7679af790707b Mon Sep 17 00:00:00 2001 From: PaddleStroke Date: Thu, 13 Nov 2025 12:05:17 +0100 Subject: [PATCH] Assembly: BOM: fix settings not applied (#25269) --- src/Mod/Assembly/CommandCreateBom.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Mod/Assembly/CommandCreateBom.py b/src/Mod/Assembly/CommandCreateBom.py index a84354dd00..7ab6af08d4 100644 --- a/src/Mod/Assembly/CommandCreateBom.py +++ b/src/Mod/Assembly/CommandCreateBom.py @@ -125,10 +125,6 @@ class TaskAssemblyCreateBom(QtCore.QObject): self.addColItem(name) self.bomObj = bomObj - self.form.CheckBox_onlyParts.setChecked(bomObj.onlyParts) - self.form.CheckBox_detailParts.setChecked(bomObj.detailParts) - self.form.CheckBox_detailSubAssemblies.setChecked(bomObj.detailSubAssemblies) - else: App.setActiveTransaction("Create Bill Of Materials") @@ -137,11 +133,13 @@ class TaskAssemblyCreateBom(QtCore.QObject): self.addColItem(name) self.createBomObject() - self.form.CheckBox_onlyParts.setChecked(pref.GetBool("BOMOnlyParts", False)) - self.form.CheckBox_detailParts.setChecked(pref.GetBool("BOMDetailParts", True)) - self.form.CheckBox_detailSubAssemblies.setChecked( - pref.GetBool("BOMDetailSubAssemblies", True) - ) + self.bomObj.onlyParts = pref.GetBool("BOMOnlyParts", False) + self.bomObj.detailParts = pref.GetBool("BOMDetailParts", True) + self.bomObj.detailSubAssemblies = pref.GetBool("BOMDetailSubAssemblies", True) + + self.form.CheckBox_onlyParts.setChecked(self.bomObj.onlyParts) + self.form.CheckBox_detailParts.setChecked(self.bomObj.detailParts) + self.form.CheckBox_detailSubAssemblies.setChecked(self.bomObj.detailSubAssemblies) self.form.columnList.model().rowsMoved.connect(self.onItemsReordered) self.form.columnList.itemChanged.connect(self.itemUpdated)