diff --git a/src/Mod/Draft/DraftGui.py b/src/Mod/Draft/DraftGui.py index 6b49f786d0..28032dc89e 100644 --- a/src/Mod/Draft/DraftGui.py +++ b/src/Mod/Draft/DraftGui.py @@ -1198,23 +1198,24 @@ class DraftToolBar: self.delButton.setChecked(not(addmode)) def showCommandOptions(self,name): - cmdstr = "\n"+name+" "+translate("draft","options")+" : " - first = True - for k,v in inCommandShortcuts.items(): - if v[2]: - if getattr(self,v[2]).isVisible(): + if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft").GetBool("Verbose",True): + cmdstr = "\n"+name+" "+translate("draft","options")+" : " + first = True + for k,v in inCommandShortcuts.items(): + if v[2]: + if getattr(self,v[2]).isVisible(): + if first: + first = False + else: + cmdstr += ", " + cmdstr += v[0] + ":" + v[1] + else: if first: first = False else: cmdstr += ", " cmdstr += v[0] + ":" + v[1] - else: - if first: - first = False - else: - cmdstr += ", " - cmdstr += v[0] + ":" + v[1] - FreeCAD.Console.PrintMessage(cmdstr+"\n\n") + FreeCAD.Console.PrintMessage(cmdstr+"\n\n") def checkLocal(self): "checks if x,y,z coords must be displayed as local or global" diff --git a/src/Mod/Draft/DraftTools.py b/src/Mod/Draft/DraftTools.py index 69a2e7d1b9..5005c48100 100644 --- a/src/Mod/Draft/DraftTools.py +++ b/src/Mod/Draft/DraftTools.py @@ -75,14 +75,16 @@ MODALT = MODS[Draft.getParam("modalt",2)] def msg(text=None,mode=None): "prints the given message on the FreeCAD status bar" - if not text: FreeCAD.Console.PrintMessage("") - else: - if mode == 'warning': - FreeCAD.Console.PrintWarning(text) - elif mode == 'error': - FreeCAD.Console.PrintError(text) + if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft").GetBool("Verbose",True): + if not text: + FreeCAD.Console.PrintMessage("") else: - FreeCAD.Console.PrintMessage(text) + if mode == 'warning': + FreeCAD.Console.PrintWarning(text) + elif mode == 'error': + FreeCAD.Console.PrintError(text) + else: + FreeCAD.Console.PrintMessage(text) def formatUnit(exp,unit="mm"): '''returns a formatting string to set a number to the correct unit''' diff --git a/src/Mod/Draft/Resources/ui/preferences-draft.ui b/src/Mod/Draft/Resources/ui/preferences-draft.ui index c3d2503e81..c9ce82569c 100755 --- a/src/Mod/Draft/Resources/ui/preferences-draft.ui +++ b/src/Mod/Draft/Resources/ui/preferences-draft.ui @@ -7,7 +7,7 @@ 0 0 487 - 489 + 491 @@ -80,47 +80,58 @@ - - - - - If this is checked, copy mode will be kept across command, otherwise commands will always start in no-copy mode - - - Global copy mode - - - true - - - copymode - - - Mod/Draft - - - - + + + If this is checked, step-by-step instructions will be displayed in the Output Window when running Draft commands + + + Verbose command line mode + + + true + + + Verbose + + + Mod/Draft + + - - - - - 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 is checked, copy mode will be kept across command, otherwise commands will always start in no-copy mode + + + Global copy mode + + + true + + + copymode + + + Mod/Draft + + + + + + + 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 + + @@ -276,64 +287,52 @@ Values with differences below this value will be treated as same. - - - - - When this is checked, the Draft tools will create Part primitives instead of Draft objects, when available. - - - Use Part Primitives when available - - - UsePartPrimitives - - - Mod/Draft - - - - + + + When this is checked, the Draft tools will create Part primitives instead of Draft objects, when available. + + + Use Part Primitives when available + + + UsePartPrimitives + + + Mod/Draft + + - - - - - If this is checked, objects will appear as filled by default. Otherwise, they will appear as wireframe - - - Fill objects with faces whenever possible - - - true - - - fillmode - - - Mod/Draft - - - - + + + If this is checked, objects will appear as filled by default. Otherwise, they will appear as wireframe + + + Fill objects with faces whenever possible + + + true + + + fillmode + + + Mod/Draft + + - - - - - When drawing lines, set focus on Length instead of X coordinate - - - focusOnLength - - - Mod/Draft - - - - + + + When drawing lines, set focus on Length instead of X coordinate + + + focusOnLength + + + Mod/Draft + +