Merge pull request #21921 from furgo16/add-prefcheckablegroupbox

Gui, Draft, BIM: Add PrefCheckableGroupBox, use it in IFC exporter preferences page
This commit is contained in:
Chris Hennes
2025-06-16 11:06:30 -05:00
committed by GitHub
6 changed files with 68 additions and 1 deletions

View File

@@ -407,7 +407,7 @@ However, at FreeCAD, we believe having a building should not be mandatory, and t
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_ExportFreeCADGroups">
<widget class="Gui::PrefCheckableGroupBox" name="groupBox_ExportFreeCADGroups">
<property name="toolTip">
<string>If not checked, standard FreeCAD groups (App::DocumentObjectGroup) will not be exported as IfcGroup or IfcElementAssembly.\nTheir children will be re-parented to the container of the skipped group in the IFC structure.</string>
</property>

View File

@@ -696,6 +696,11 @@ def _get_param_dictionary():
elif att_class == "Gui::PrefFontBox":
path, entry, value = _param_from_PrefFontBox(widget)
typ = "string"
elif att_class == "Gui::PrefCheckableGroupBox":
# It's a boolean preference, so we can reuse the parsing logic
# from _param_from_PrefCheckBox, which looks for <property name="checked">.
path, entry, value = _param_from_PrefCheckBox(widget)
typ = "bool"
if path is not None:
if path in param_dict: