diff --git a/src/Gui/PreferencePages/DlgSettingsGeneral.cpp b/src/Gui/PreferencePages/DlgSettingsGeneral.cpp
index 24c632801a..4e367e6c71 100644
--- a/src/Gui/PreferencePages/DlgSettingsGeneral.cpp
+++ b/src/Gui/PreferencePages/DlgSettingsGeneral.cpp
@@ -712,4 +712,4 @@ void DlgSettingsGeneral::attachObserver()
handlers.addHandler(ParamKey(hDockWindows->GetGroup("DAGView"), "Enabled"), applyDockWidget);
}
-#include "moc_DlgSettingsGeneral.cpp"
+#include "moc_DlgSettingsGeneral.cpp"
\ No newline at end of file
diff --git a/src/Mod/Part/Gui/DlgSettingsGeneral.cpp b/src/Mod/Part/Gui/DlgSettingsGeneral.cpp
index f9b9545005..f02345f2c9 100644
--- a/src/Mod/Part/Gui/DlgSettingsGeneral.cpp
+++ b/src/Mod/Part/Gui/DlgSettingsGeneral.cpp
@@ -60,6 +60,7 @@ void DlgSettingsGeneral::saveSettings()
ui->checkBooleanRefine->onSave();
ui->checkSketchBaseRefine->onSave();
ui->checkObjectNaming->onSave();
+ ui->checkAllowCompoundBody->onSave();
}
void DlgSettingsGeneral::loadSettings()
@@ -68,6 +69,7 @@ void DlgSettingsGeneral::loadSettings()
ui->checkBooleanRefine->onRestore();
ui->checkSketchBaseRefine->onRestore();
ui->checkObjectNaming->onRestore();
+ ui->checkAllowCompoundBody->onRestore();
}
/**
diff --git a/src/Mod/Part/Gui/DlgSettingsGeneral.ui b/src/Mod/Part/Gui/DlgSettingsGeneral.ui
index 8e7e540da7..931175dff1 100644
--- a/src/Mod/Part/Gui/DlgSettingsGeneral.ui
+++ b/src/Mod/Part/Gui/DlgSettingsGeneral.ui
@@ -13,8 +13,8 @@
General
-
- -
+
+
-
Model settings
@@ -62,14 +62,17 @@
- -
+
-
-
- Object naming
+
+ true
false
+
+ Object naming
+
-
@@ -87,7 +90,45 @@
- -
+
-
+
+
+ true
+
+
+ Experimental
+
+
+ false
+
+
+
-
+
+
+ These settings are experimental and may result in decreased stability, more problems and undefined behaviors.
+
+
+ true
+
+
+
+ -
+
+
+ Allow multiple solids in Part Design Body by default (experimental)
+
+
+ AllowCompoundDefault
+
+
+ Mod/PartDesign
+
+
+
+
+
+
+ -
Qt::Vertical
diff --git a/src/Mod/PartDesign/App/Feature.cpp b/src/Mod/PartDesign/App/Feature.cpp
index fe6e1eeadd..d3c24e76d3 100644
--- a/src/Mod/PartDesign/App/Feature.cpp
+++ b/src/Mod/PartDesign/App/Feature.cpp
@@ -180,6 +180,12 @@ bool Feature::isSingleSolidRuleSatisfied(const TopoDS_Shape& shape, TopAbs_Shape
Feature::SingleSolidRuleMode Feature::singleSolidRuleMode()
{
auto body = getFeatureBody();
+
+ // When the feature is not part of an body (which should not happen) let's stay with the default
+ if (!body) {
+ return SingleSolidRuleMode::Enforced;
+ }
+
auto areCompoundSolidsAllowed = body->AllowCompound.getValue();
return areCompoundSolidsAllowed ? SingleSolidRuleMode::Disabled : SingleSolidRuleMode::Enforced;