Просмотр исходного кода

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.
Jaime van Kessel 4 лет назад
Родитель
Сommit
f0002e265b

+ 2 - 0
cura/Settings/CuraContainerStack.py

@@ -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()
 

+ 2 - 0
cura/Settings/ExtruderStack.py

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

+ 2 - 0
cura/Settings/GlobalStack.py

@@ -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()