Draft: Added a preference to turn on/off tool messages (off by default) - fixes #7078
This commit is contained in:
@@ -35,6 +35,8 @@ added manually.
|
||||
# @{
|
||||
import FreeCAD as App
|
||||
|
||||
params = App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft")
|
||||
|
||||
|
||||
def _msg(text, end="\n"):
|
||||
"""Write messages to the console including the line ending."""
|
||||
@@ -55,4 +57,10 @@ def _log(text, end="\n"):
|
||||
"""Write messages to the log file including the line ending."""
|
||||
App.Console.PrintLog(text + end)
|
||||
|
||||
def _toolmsg(text, end="\n"):
|
||||
"""Write messages to the console including the line ending,
|
||||
only if ToolMessages pref setting is True"""
|
||||
if params.GetBool("ToolMessages", False):
|
||||
App.Console.PrintMessage(text + end)
|
||||
|
||||
## @}
|
||||
|
||||
Reference in New Issue
Block a user