From b6779ed1e4188d9e8358a67f9018a0d45f9e5a58 Mon Sep 17 00:00:00 2001 From: shai Date: Sun, 8 Dec 2024 15:27:11 +0200 Subject: [PATCH] hide old properties instead of removing it --- SheetMetalTools.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/SheetMetalTools.py b/SheetMetalTools.py index cf06da4..a4d8ca9 100644 --- a/SheetMetalTools.py +++ b/SheetMetalTools.py @@ -498,13 +498,14 @@ def smAddProperty(obj, proptype, name, proptip, defval=None, obj.addProperty(proptype, name, paramgroup, proptip) if defval is not None: setattr(obj, name, defval) - # replaced name is either given or automatically search for - # old lower case version of the same parameter - if replacedname is None and name[0].isupper(): - replacedname = name[0].lower() + name[1:] - if replacedname is not None and hasattr(obj, replacedname): - setattr(obj, name, getattr(obj, replacedname)) - obj.removeProperty(replacedname) + # replaced name is either given or automatically search for + # old lower case version of the same parameter + if replacedname is None and name[0].isupper(): + replacedname = name[0].lower() + name[1:] + if replacedname is not None and hasattr(obj, replacedname): + setattr(obj, name, getattr(obj, replacedname)) + #obj.removeProperty(replacedname) + obj.setEditorMode(replacedname, 2) # Hide