Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2022-01-18 16:45:46 +0300
committerJaime van Kessel <nallath@gmail.com>2022-01-18 16:45:46 +0300
commitaac380aa49a4d78ea7ae82ad883f5d4d665fa410 (patch)
tree9ff7e3ee830caa9220727d0518a30edbbfc91bc7
parentfb80f1228980a926efdc9d58e1192822bb9cefa1 (diff)
Simplify the machineErrorCheckerrefactor_welcome_models
-rwxr-xr-xcura/CuraApplication.py9
-rw-r--r--cura/Machines/MachineErrorChecker.py4
2 files changed, 2 insertions, 11 deletions
diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py
index c83153cbc1..e62ec97849 100755
--- a/cura/CuraApplication.py
+++ b/cura/CuraApplication.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2021 Ultimaker B.V.
+# Copyright (c) 2022 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import os
@@ -11,7 +11,6 @@ import numpy
from PyQt5.QtCore import QObject, QTimer, QUrl, pyqtSignal, pyqtProperty, QEvent, Q_ENUMS
from PyQt5.QtGui import QColor, QIcon
from PyQt5.QtQml import qmlRegisterUncreatableType, qmlRegisterSingletonType, qmlRegisterType
-from PyQt5.QtWidgets import QMessageBox
import UM.Util
import cura.Settings.cura_empty_instance_containers
@@ -717,11 +716,6 @@ class CuraApplication(QtApplication):
ContainerRegistry.getInstance().saveDirtyContainers()
self.savePreferences()
- def saveStack(self, stack):
- if not self._enable_save:
- return
- ContainerRegistry.getInstance().saveContainer(stack)
-
@pyqtSlot(str, result = QUrl)
def getDefaultPath(self, key):
default_path = self.getPreferences().getValue("local_file/%s" % key)
@@ -781,7 +775,6 @@ class CuraApplication(QtApplication):
Logger.log("i", "Initializing machine error checker")
self._machine_error_checker = MachineErrorChecker(self)
- self._machine_error_checker.initialize()
self.processEvents()
Logger.log("i", "Initializing machine manager")
diff --git a/cura/Machines/MachineErrorChecker.py b/cura/Machines/MachineErrorChecker.py
index 8213734348..58ca8e49ef 100644
--- a/cura/Machines/MachineErrorChecker.py
+++ b/cura/Machines/MachineErrorChecker.py
@@ -50,12 +50,10 @@ class MachineErrorChecker(QObject):
self._error_check_timer = QTimer(self)
self._error_check_timer.setInterval(100)
self._error_check_timer.setSingleShot(True)
+ self._error_check_timer.timeout.connect(self._rescheduleCheck)
self._keys_to_check = set() # type: Set[str]
- def initialize(self) -> None:
- self._error_check_timer.timeout.connect(self._rescheduleCheck)
-
# Reconnect all signals when the active machine gets changed.
self._machine_manager.globalContainerChanged.connect(self._onMachineChanged)