From 8d7281e97bb2c49fa42688614cf31d08417eb916 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Fri, 23 Apr 2021 15:46:39 +0200 Subject: [PATCH] Draft: Fixed default color for new dimensions (now uses DefautTextColor instead of DefaultLineColor) --- src/Mod/Draft/draftutils/gui_utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Mod/Draft/draftutils/gui_utils.py b/src/Mod/Draft/draftutils/gui_utils.py index 07db9887dd..936d868322 100644 --- a/src/Mod/Draft/draftutils/gui_utils.py +++ b/src/Mod/Draft/draftutils/gui_utils.py @@ -381,7 +381,12 @@ def format_object(target, origin=None): if "PointColor" in obrep.PropertiesList: obrep.PointColor = lcol if "LineColor" in obrep.PropertiesList: - obrep.LineColor = lcol + 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 + obrep.LineColor = tcol + else: + obrep.LineColor = lcol if "ShapeColor" in obrep.PropertiesList: obrep.ShapeColor = fcol else: