allow property values to be floats or ints

This commit is contained in:
Martin Baeuml
2011-06-28 16:58:12 +02:00
parent cdf799b0d6
commit 5f9502451a
+4 -2
View File
@@ -83,8 +83,10 @@ class DefaultAttributeHandler(QGroupBox, AbstractAttributeHandler):
def updateValues(self, values):
# TODO: Properly parse
for val in values:
if val not in self._values:
self.addValue(val)
if isinstance(val, str) or isinstance(val, float) or isinstance(val, int):
val = str(val)
if val not in self._values:
self.addValue(val)
def defaults(self):
return self._defaults