observer: Subject incorrectly notified based on variable names

This commit is contained in:
June Tate-Gans 2021-05-08 19:22:08 -05:00
parent 7945f9d246
commit 841ad65b89

View File

@ -69,8 +69,8 @@ class Subject(object):
self._changes = []
def setProperty(self, propertyName, value, notify=True):
propertyName = '_' + propertyName
self.__dict__[propertyName] = value
realPropertyName = '_' + propertyName
self.__dict__[realPropertyName] = value
self.addChange(ChangeType.MODIFY, propertyName, value)
if notify:
self.notifyChanged()