aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortassaron2017-08-16 21:02:53 -0400
committertassaron2017-08-16 21:02:53 -0400
commitddb04f3a2fe6454a9c98bba39d07a12bd6a91b45 (patch)
tree21dd22334801576bcbe7c1db8db9e7cab404fd21
parentf65ced2853a07b312516bcb729cc28509f524077 (diff)
undo merge IDs given per attr instead of widget type
-rw-r--r--src/component.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/component.py b/src/component.py
index 488b92a..b883627 100644
--- a/src/component.py
+++ b/src/component.py
@@ -684,12 +684,7 @@ class ComponentUpdate(QtWidgets.QUndoCommand):
self.id_ = -1
if len(self.modifiedVals) == 1:
attr, val = self.modifiedVals.popitem()
- widget = self.parent._trackedWidgets[attr]
- if type(widget) is QtWidgets.QLineEdit:
- self.id_ = 10
- elif type(widget) is QtWidgets.QSpinBox \
- or type(widget) is QtWidgets.QDoubleSpinBox:
- self.id_ = 20
+ self.id_ = sum([ord(letter) for letter in attr[:14]])
self.modifiedVals[attr] = val
else:
log.warning(