Draft: Update gui_utils.py (#8191)

This commit is contained in:
Roy-043
2023-01-14 13:53:38 +01:00
committed by GitHub
parent a9ed294765
commit b9542289c5

View File

@@ -398,8 +398,6 @@ def format_object(target, origin=None):
if not origin or not hasattr(origin, 'ViewObject'):
if "FontSize" in obrep.PropertiesList:
obrep.FontSize = fs
if "TextSize" in obrep.PropertiesList:
obrep.TextSize = fs
if "TextColor" in obrep.PropertiesList:
obrep.TextColor = tcol
if "LineWidth" in obrep.PropertiesList:
@@ -407,9 +405,9 @@ def format_object(target, origin=None):
if "PointColor" in obrep.PropertiesList:
obrep.PointColor = lcol
if "LineColor" in obrep.PropertiesList:
if hasattr(obrep,"FontName") and (not hasattr(obrep,"TextColor")):
# dimensions and other objects with text but no specific
# TextColor property. TODO: Add TextColor property to dimensions
if hasattr(obrep,"FontName"):
# Do not use lcol for annotations.
# ToDo: add line color preference for annotations.
obrep.LineColor = tcol
else:
obrep.LineColor = lcol