Mark recently constructed stacks as not dirty

The stacks would get marked dirty for setting some metadata, but since thats
part of their construction, they aren't really dirty.

Previously, every single stack that was loaded would be marked as dirty, which causes unneeded
saving.
This commit is contained in:
Jaime van Kessel 2020-06-18 17:39:58 +02:00
parent 43c5d05853
commit f0002e265b
No known key found for this signature in database
GPG key ID: 3710727397403C91
3 changed files with 6 additions and 0 deletions

View file

@ -60,6 +60,8 @@ class CuraContainerStack(ContainerStack):
import cura.CuraApplication #Here to prevent circular imports.
self.setMetaDataEntry("setting_version", cura.CuraApplication.CuraApplication.SettingVersion)
self.setDirty(False)
# This is emitted whenever the containersChanged signal from the ContainerStack base class is emitted.
pyqtContainersChanged = pyqtSignal()

View file

@ -32,6 +32,8 @@ class ExtruderStack(CuraContainerStack):
self.propertiesChanged.connect(self._onPropertiesChanged)
self.setDirty(False)
enabledChanged = pyqtSignal()
@override(ContainerStack)

View file

@ -55,6 +55,8 @@ class GlobalStack(CuraContainerStack):
# properties. So we need to tie them together like this.
self.metaDataChanged.connect(self.configuredConnectionTypesChanged)
self.setDirty(False)
extrudersChanged = pyqtSignal()
configuredConnectionTypesChanged = pyqtSignal()