Draft: Display default file and pattern in hatch task panel

Fixes #18197.
This commit is contained in:
Roy-043
2024-11-29 23:28:19 +01:00
committed by Yorik van Havre
parent 6bf372aef6
commit fa65fcce0d
2 changed files with 12 additions and 11 deletions

View File

@@ -23,6 +23,7 @@
""" Contains a parameter observer class and parameter related functions."""
import os
import PySide.QtCore as QtCore
import xml.etree.ElementTree as ET
@@ -372,6 +373,10 @@ def _get_param_dictionary():
param_dict = {}
hatch_pattern_file = os.path.join(
App.getResourceDir().replace("\\", "/"), "Mod/TechDraw/PAT/FCPAT.pat"
)
# Draft parameters that are not in the preferences:
param_dict["Mod/Draft"] = {
"AnnotationStyleEditorHeight": ("int", 450),
@@ -388,7 +393,9 @@ def _get_param_dictionary():
"fillmode": ("bool", True),
"GlobalMode": ("bool", False),
"GridHideInOtherWorkbenches": ("bool", True),
"HatchPatternResolution": ("int", 128),
"HatchPatternFile": ("string", hatch_pattern_file),
"HatchPatternName": ("string", "Diamant"),
"HatchPatternResolution": ("int", 128), # used for SVG patterns
"HatchPatternRotation": ("float", 0.0),
"HatchPatternScale": ("float", 100.0),
"labeltype": ("string", "Custom"),
@@ -482,12 +489,6 @@ def _get_param_dictionary():
"MaxDeviationExport": ("float", 0.1),
}
# For the Mod/TechDraw/PAT parameters we do not check the preferences:
param_dict["Mod/TechDraw/PAT"] = {
"FilePattern": ("string", ""),
"NamePattern": ("string", "Diamant"),
}
# For the General parameters we do not check the preferences:
param_dict["General"] = {
"ToolbarIconSize": ("int", 24),