diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index f4f121eda8..37952a42ac 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1061,9 +1061,6 @@ class CuraApplication(QtApplication): op.push() Selection.clear() - Logger.log("i", "Reseting print information") - self._print_information = PrintInformation.PrintInformation() - # stay on the same build plate #self.getCuraSceneController().setActiveBuildPlate(0) # Select first build plate diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index 838628e37c..5d5d59ed3b 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from PyQt5.QtCore import QObject, pyqtSignal, pyqtProperty @@ -65,6 +65,7 @@ class PrintInformation(QObject): self._backend = Application.getInstance().getBackend() if self._backend: self._backend.printDurationMessage.connect(self._onPrintDurationMessage) + Application.getInstance().getController().getScene().sceneChanged.connect(self.setToZeroPrintInformation) self._base_name = "" self._abbr_machine = "" @@ -171,7 +172,7 @@ class PrintInformation(QObject): def printTimes(self): return self._print_time_message_values[self._active_build_plate] - def _onPrintDurationMessage(self, build_plate_number, print_time, material_amounts): + def _onPrintDurationMessage(self, build_plate_number, print_time: Dict[str, int], material_amounts: list): self._updateTotalPrintTimePerFeature(build_plate_number, print_time) self.currentPrintTimeChanged.emit()