Draft: improve handling of anno DisplayMode and LineSpacing

* DisplayMode controlled by new pref DefaultAnnoDisplayMode. This replaces the old dimstyle pref.
* LineSpacing pref is now used when creating annotations. Will be added to prefs ui later.
* format_object no longer changes FontSize as this conflicted with the height parameter in the make_text function.
* make_text function updated.
This commit is contained in:
Roy-043
2023-11-27 12:50:11 +01:00
committed by Yorik van Havre
parent 5a4a358f13
commit 484bbf3807
9 changed files with 39 additions and 38 deletions

View File

@@ -492,10 +492,7 @@ def format_object(target, origin=None):
tcol = (float(tcol[0]), float(tcol[1]), float(tcol[2]), 0.0)
fcol = (float(fcol[0]), float(fcol[1]), float(fcol[2]), 0.0)
lw = utils.getParam("linewidth",2)
fs = utils.getParam("textheight",0.20)
if not origin or not hasattr(origin, 'ViewObject'):
if "FontSize" in obrep.PropertiesList:
obrep.FontSize = fs
if "TextColor" in obrep.PropertiesList:
obrep.TextColor = tcol
if "LineWidth" in obrep.PropertiesList: