Draft: Introduce DefaultAnnoScaleMultiplier parameter

This parameter replaces DraftAnnotationScale.

The parameter can be changed in the preferences and with the Draft_SetStyle command.
This commit is contained in:
Roy-043
2023-12-09 19:14:48 +01:00
parent 05585a6e73
commit 56b8f76cfb
7 changed files with 104 additions and 45 deletions

View File

@@ -54,9 +54,6 @@ from draftutils.messages import _msg
from draftutils.translate import translate
param = App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft")
class ViewProviderDraftAnnotation(object):
"""The base class for Draft Annotation viewproviders.
@@ -90,8 +87,7 @@ class ViewProviderDraftAnnotation(object):
"ScaleMultiplier",
"Annotation",
_tip)
anno_scale = param.GetFloat("DraftAnnotationScale", 1)
vobj.ScaleMultiplier = 1 / anno_scale if anno_scale > 0 else 1
vobj.ScaleMultiplier = utils.get_param("DefaultAnnoScaleMultiplier", 1)
if "AnnotationStyle" not in properties:
_tip = QT_TRANSLATE_NOOP("App::Property",