diff --git a/src/Mod/Draft/draftguitools/gui_fillets.py b/src/Mod/Draft/draftguitools/gui_fillets.py index 74c47a1abfd4..03a0f6343999 100644 --- a/src/Mod/Draft/draftguitools/gui_fillets.py +++ b/src/Mod/Draft/draftguitools/gui_fillets.py @@ -42,6 +42,7 @@ from draftguitools import gui_base_original from draftguitools import gui_tool_utils from draftmake import make_fillet +from draftutils import params from draftutils import utils from draftutils.messages import _err, _toolmsg from draftutils.translate import translate @@ -73,9 +74,9 @@ def Activated(self, name="Fillet"): super().Activated(name=name) if self.ui: - self.rad = 100 - self.chamfer = False - self.delete = False + self.rad = params.get_param("FilletRadius") + self.chamfer = params.get_param("FilletChamferMode") + self.delete = params.get_param("FilletDeleteMode") label = translate("draft", "Fillet radius") tooltip = translate("draft", "Radius of fillet") @@ -127,10 +128,12 @@ def action(self, arg): def set_delete(self): """Execute as a callback when the delete checkbox changes.""" self.delete = self.ui.check_delete.isChecked() + params.set_param("FilletDeleteMode", self.delete) def set_chamfer(self): """Execute as a callback when the chamfer checkbox changes.""" self.chamfer = self.ui.check_chamfer.isChecked() + params.set_param("FilletChamferMode", self.chamfer) def numericRadius(self, rad): """Validate the entry radius in the user interface. @@ -139,6 +142,7 @@ def numericRadius(self, rad): when a valid radius has been entered in the input field. """ self.rad = rad + params.set_param("FilletRadius", self.rad) self.draw_arc(rad, self.chamfer, self.delete) def draw_arc(self, rad, chamfer, delete): diff --git a/src/Mod/Draft/draftutils/params.py b/src/Mod/Draft/draftutils/params.py index 69a9ee5c996b..a1a6b50fa74a 100644 --- a/src/Mod/Draft/draftutils/params.py +++ b/src/Mod/Draft/draftutils/params.py @@ -390,6 +390,9 @@ def _get_param_dictionary(): "DefaultPrintColor": ("unsigned", 255), "Draft_array_fuse": ("bool", False), "Draft_array_Link": ("bool", True), + "FilletRadius": ("float", 100.0), + "FilletChamferMode": ("bool", False), + "FilletDeleteMode": ("bool", False), "fillmode": ("bool", True), "GlobalMode": ("bool", False), "GridHideInOtherWorkbenches": ("bool", True),