From daea162ae28edc98154a4fd44431a9ae69605063 Mon Sep 17 00:00:00 2001 From: Roy-043 Date: Thu, 16 Nov 2023 11:40:23 +0100 Subject: [PATCH] Draft: prefs: remove copymode, useSupport no longer via UI This PR removes the copymode (Global copy mode) preference. Forum topic: https://forum.freecad.org/viewtopic.php?t=82679 Additionally useSupport is removed from preferences-draft.ui, turning it into a fine-tuning preference. Use of this feature is rare and may not be supported in the future. No need to present this preference to new users in the UI. Forum topic: https://forum.freecad.org/viewtopic.php?t=80689 --- src/Mod/Draft/DraftGui.py | 11 ++-- .../Draft/Resources/ui/preferences-draft.ui | 50 +++---------------- 2 files changed, 12 insertions(+), 49 deletions(-) diff --git a/src/Mod/Draft/DraftGui.py b/src/Mod/Draft/DraftGui.py index 83aa249fde..3f0d23c149 100644 --- a/src/Mod/Draft/DraftGui.py +++ b/src/Mod/Draft/DraftGui.py @@ -944,8 +944,7 @@ class DraftToolBar: self.isCopy.show() self.isSubelementMode.show() p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft") - if p.GetBool("copymode",False): - self.isCopy.setChecked(p.GetBool("copymodeValue",False)) + self.isCopy.setChecked(p.GetBool("copymodeValue",False)) self.continueCmd.show() def checkLocal(self): @@ -996,11 +995,11 @@ class DraftToolBar: def setCopymode(self,val=0): p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft") - p.SetBool("copymodeValue",bool(val)) # special value for offset command - if self.sourceCmd: - if self.sourceCmd.featureName == "Offset": - p.SetBool("OffsetCopyMode",bool(val)) + if self.sourceCmd and self.sourceCmd.featureName == "Offset": + p.SetBool("OffsetCopyMode",bool(val)) + else: + p.SetBool("copymodeValue",bool(val)) def setSubelementMode(self): self.sourceCmd.set_ghosts() diff --git a/src/Mod/Draft/Resources/ui/preferences-draft.ui b/src/Mod/Draft/Resources/ui/preferences-draft.ui index c7f5dd2051..54e821eab3 100644 --- a/src/Mod/Draft/Resources/ui/preferences-draft.ui +++ b/src/Mod/Draft/Resources/ui/preferences-draft.ui @@ -189,39 +189,6 @@ This allows to point the direction and type the distance. - - - Normally, after copying objects, the copies get selected. -If this option is checked, the base objects will be selected instead. - - - Select base objects after copying - - - selectBaseObjects - - - Mod/Draft - - - - - - - If this option is set, when creating Draft objects on top of an existing face of another object, the "Support" property of the Draft object will be set to the base object. This was the standard behaviour before FreeCAD 0.19 - - - Set the Support property when possible - - - useSupport - - - Mod/Draft - - - - If this is checked, objects will appear as filled by default. @@ -241,27 +208,24 @@ Otherwise, they will appear as wireframe - - + + - If this is checked, copy mode will be kept across command, -otherwise commands will always start in no-copy mode + Normally, after copying objects, the copies get selected. +If this option is checked, the base objects will be selected instead. - Global copy mode - - - false + Select base objects after copying - copymode + selectBaseObjects Mod/Draft - + Force Draft Tools to create Part primitives instead of Draft objects.