diff --git a/src/Mod/Assembly/App/AssemblyObject.cpp b/src/Mod/Assembly/App/AssemblyObject.cpp index f8343cff06..e3c8e1089e 100644 --- a/src/Mod/Assembly/App/AssemblyObject.cpp +++ b/src/Mod/Assembly/App/AssemblyObject.cpp @@ -399,6 +399,10 @@ std::shared_ptr AssemblyObject::makeMbdAssembly() auto assembly = CREATE::With(); assembly->setName("OndselAssembly"); + ParameterGrp::handle hPgr = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Assembly"); + + assembly->setDebug(hPgr->GetBool("LogSolverDebug", false)); return assembly; } diff --git a/src/Mod/Assembly/Gui/Resources/preferences/Assembly.ui b/src/Mod/Assembly/Gui/Resources/preferences/Assembly.ui index 642cbe1da0..6be6dfdf3a 100644 --- a/src/Mod/Assembly/Gui/Resources/preferences/Assembly.ui +++ b/src/Mod/Assembly/Gui/Resources/preferences/Assembly.ui @@ -34,13 +34,33 @@ + + + Log the dragging steps of the solver. Useful if you want to report a bug. +The files are named "runPreDrag.asmt" and "dragging.log" and are located in the default directory of std::ofstream (on Windows it's the desktop) + + + Log dragging steps + + + false + + + LogSolverDebug + + + Mod/Assembly + + + + Ground first part: - + When you insert the first part in the assembly, you can choose to ground the part automatically. @@ -50,7 +70,7 @@ - + Qt::Horizontal @@ -63,7 +83,7 @@ - + Qt::Vertical diff --git a/src/Mod/Assembly/Preferences.py b/src/Mod/Assembly/Preferences.py index 8f96362a4d..5bb07ccea6 100644 --- a/src/Mod/Assembly/Preferences.py +++ b/src/Mod/Assembly/Preferences.py @@ -38,11 +38,13 @@ class PreferencesPage: def saveSettings(self): pref = preferences() pref.SetBool("LeaveEditWithEscape", self.form.checkBoxEnableEscape.isChecked()) + pref.SetBool("LogSolverDebug", self.form.checkBoxSolverDebug.isChecked()) pref.SetInt("GroundFirstPart", self.form.groundFirstPart.currentIndex()) def loadSettings(self): pref = preferences() self.form.checkBoxEnableEscape.setChecked(pref.GetBool("LeaveEditWithEscape", True)) + self.form.checkBoxSolverDebug.setChecked(pref.GetBool("LogSolverDebug", False)) self.form.groundFirstPart.clear() self.form.groundFirstPart.addItem(translate("Assembly", "Ask")) self.form.groundFirstPart.addItem(translate("Assembly", "Always"))