Allow setting userChanges container

Since that makes it possible to create an external factory method for
creating stacks and makes the properties more consistent.
This commit is contained in:
Arjen Hiemstra 2017-03-28 17:46:00 +02:00
parent 2f6936c961
commit 123c8bae45

View file

@ -29,7 +29,10 @@ class GlobalStack(ContainerStack):
pyqtContainersChanged = pyqtSignal() pyqtContainersChanged = pyqtSignal()
@pyqtProperty(InstanceContainer, notify = pyqtContainersChanged) def setUserChanges(self, new_user_changes: InstanceContainer) -> None:
self.replaceContainer(_ContainerIndexes.UserChanges, new_user_changes)
@pyqtProperty(InstanceContainer, fset = setUserChanges, notify = pyqtContainersChanged)
def userChanges(self) -> InstanceContainer: def userChanges(self) -> InstanceContainer:
return self._containers[_ContainerIndexes.UserChanges] return self._containers[_ContainerIndexes.UserChanges]