| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | import FreeCAD |
| | import FreeCADGui |
| |
|
| | translate = FreeCAD.Qt.translate |
| |
|
| |
|
| | def preferences(): |
| | return FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Assembly") |
| |
|
| |
|
| | class PreferencesPage: |
| | def __init__(self, parent=None): |
| | self.form = FreeCADGui.PySideUic.loadUi(":preferences/Assembly.ui") |
| |
|
| | 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")) |
| | self.form.groundFirstPart.addItem(translate("Assembly", "Never")) |
| | self.form.groundFirstPart.setCurrentIndex(pref.GetInt("GroundFirstPart", 0)) |
| |
|