File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -794,12 +794,7 @@ def pick_color():
794794 return btn
795795
796796 # 4. NUMERIC
797- is_numeric = TypeSafeParser .is_numeric_param (key ) or annotation in (float , int )
798- # EXCEPTION: 'text' and 'tex_strings' must ALWAYS be treated as strings, never numeric
799- if key in ("text" , "tex_strings" ):
800- is_numeric = False
801-
802- if is_numeric :
797+ if TypeSafeParser .is_numeric_param (key ) or annotation in (float , int ):
803798 # ... (Keep existing numeric logic) ...
804799 if annotation is float or isinstance (value , float ):
805800 sb = QDoubleSpinBox ()
Original file line number Diff line number Diff line change @@ -189,7 +189,14 @@ def is_asset_param(param_name: str) -> bool:
189189 def is_numeric_param (param_name : str ) -> bool :
190190 if TypeSafeParser .is_asset_param (param_name ):
191191 return False
192- return any (kw in param_name .lower () for kw in TypeSafeParser .NUMERIC_KEYWORDS )
192+
193+ name_lower = param_name .lower ()
194+ # EXCEPTION: 'text' and 'tex' parameters must never be treated as numeric
195+ # even if they contain 'x' or other keywords.
196+ if name_lower in ("text" , "tex_strings" , "tex" ):
197+ return False
198+
199+ return any (kw in name_lower for kw in TypeSafeParser .NUMERIC_KEYWORDS )
193200
194201 @staticmethod
195202 def is_color_param (param_name : str ) -> bool :
You can’t perform that action at this time.
0 commit comments