BIM+Draft: change object related version info to log messages
To inform the user warnings are shown if an object has new or modified properties in the current version. These warnings can however be confusing, especially if there are many. With this PR they are turned into log messages. They are also moved out of translation, and instead of the object Label the object Name is displayed. Additionally: Zero path length warnings for path arrays are now only displayed if the Align property is True. See: #21180.
This commit is contained in:
@@ -36,7 +36,7 @@ import FreeCAD as App
|
||||
from FreeCAD import Units as U
|
||||
from draftobjects.draft_annotation import DraftAnnotation
|
||||
from draftutils import gui_utils
|
||||
from draftutils.messages import _wrn
|
||||
from draftutils.messages import _log
|
||||
from draftutils.translate import translate
|
||||
|
||||
|
||||
@@ -259,12 +259,9 @@ class Label(DraftAnnotation):
|
||||
# switched: "2D text" becomes "World" and "3D text" becomes "Screen".
|
||||
# It should be the other way around:
|
||||
vobj.DisplayMode = "World" if vobj.DisplayMode == "Screen" else "Screen"
|
||||
_wrn("v0.21, " + obj.Label + ", "
|
||||
+ translate("draft", "renamed view property 'TextFont' to 'FontName'"))
|
||||
_wrn("v0.21, " + obj.Label + ", "
|
||||
+ translate("draft", "renamed view property 'TextSize' to 'FontSize'"))
|
||||
_wrn("v0.21, " + obj.Label + ", "
|
||||
+ translate("draft", "renamed 'DisplayMode' options to 'World/Screen'"))
|
||||
_log("v0.21, " + obj.Name + ", renamed view property 'TextFont' to 'FontName'")
|
||||
_log("v0.21, " + obj.Name + ", renamed view property 'TextSize' to 'FontSize'")
|
||||
_log("v0.21, " + obj.Name + ", renamed 'DisplayMode' options to 'World/Screen'")
|
||||
|
||||
def onChanged(self, obj, prop):
|
||||
"""Execute when a property is changed."""
|
||||
|
||||
Reference in New Issue
Block a user