Draft: store 3 ShapeString parameters and remove font from prefs (#21054)

* Draft: store 3 ShapeString parameters and remove font from prefs

With this PR 3 ShapeString parameters are stored:
* ShapeStringFontFile: this replaces the old FontFile parameter.
* ShapeStringHeight
* ShapeStringText

The ShapeStringFontFile is just the last selected font file and not exposed in the Preferences editor.

Additionally:
* Changed the label of the text input box from "String" to "Text".
* Changed the label of the point reset button to sentence case.

* Remove faulty docstring
This commit is contained in:
Roy-043
2025-04-29 14:13:17 +02:00
committed by GitHub
parent 27e825ce4d
commit 60f872ce1e
4 changed files with 33 additions and 54 deletions

View File

@@ -357,6 +357,7 @@ def _param_from_PrefLineEdit(widget):
def _param_from_PrefFileChooser(widget):
# Does not occur in Draft preferences anymore.
for elem in list(widget):
if "name" in elem.keys():
att_name = elem.attrib["name"]
@@ -436,6 +437,9 @@ def _get_param_dictionary():
"ScaleCopy": ("bool", False),
"ScaleRelative": ("bool", False),
"ScaleUniform": ("bool", False),
"ShapeStringFontFile": ("string", ""),
"ShapeStringHeight": ("float", 10.0),
"ShapeStringText": ("string", translate("draft", "Default")),
"snapModes": ("string", "100000000000000"),
"snapRange": ("int", 8),
"SubelementMode": ("bool", False),