diff options
| author | tassaron | 2017-08-16 21:02:53 -0400 |
|---|---|---|
| committer | tassaron | 2017-08-16 21:02:53 -0400 |
| commit | ddb04f3a2fe6454a9c98bba39d07a12bd6a91b45 (patch) | |
| tree | 21dd22334801576bcbe7c1db8db9e7cab404fd21 /src/component.py | |
| parent | f65ced2853a07b312516bcb729cc28509f524077 (diff) | |
undo merge IDs given per attr instead of widget type
Diffstat (limited to 'src/component.py')
| -rw-r--r-- | src/component.py | 7 |
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( |
