CAM: Fix group dropdown showing individual letters by ensuring groups is a list
- Add type check in PropertyCreate to wrap CustomPropertyGroups as a list if not already - Prevents dropdown from displaying each character of a string as a separate group option
This commit is contained in:
@@ -128,7 +128,10 @@ class PropertyCreate(object):
|
||||
self.form = FreeCADGui.PySideUic.loadUi(":panels/PropertyCreate.ui")
|
||||
|
||||
obj.Proxy.refreshCustomPropertyGroups()
|
||||
for g in sorted(obj.CustomPropertyGroups):
|
||||
groups = obj.CustomPropertyGroups
|
||||
if not isinstance(groups, (list, tuple)):
|
||||
groups = [groups]
|
||||
for g in sorted(groups):
|
||||
self.form.propertyGroup.addItem(g)
|
||||
if grp:
|
||||
self.form.propertyGroup.setCurrentText(grp)
|
||||
|
||||
Reference in New Issue
Block a user