From 709584cc5e0ab6f35ffd39f8be169b1bda828787 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 9 Aug 2019 15:14:52 +0200 Subject: [PATCH] No longer listen to qualitiesChanged signal to update It was only being called once upon initialisation. Turns out that this model updates itself properly only because the qualities don't change during runtime unless you change the active quality group (due to materials changing) or the printer itself. Contributes to issue CURA-6600. --- .../Models/QualityProfilesDropDownMenuModel.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cura/Machines/Models/QualityProfilesDropDownMenuModel.py b/cura/Machines/Models/QualityProfilesDropDownMenuModel.py index deabb6e9ba..1e30514029 100644 --- a/cura/Machines/Models/QualityProfilesDropDownMenuModel.py +++ b/cura/Machines/Models/QualityProfilesDropDownMenuModel.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from PyQt5.QtCore import Qt, QTimer @@ -36,14 +36,12 @@ class QualityProfilesDropDownMenuModel(ListModel): self.addRoleName(self.QualityChangesGroupRole, "quality_changes_group") self.addRoleName(self.IsExperimentalRole, "is_experimental") - self._application = Application.getInstance() - self._machine_manager = self._application.getMachineManager() - self._quality_manager = Application.getInstance().getQualityManager() + application = Application.getInstance() + self._machine_manager = application.getMachineManager() - self._application.globalContainerStackChanged.connect(self._onChange) + application.globalContainerStackChanged.connect(self._onChange) self._machine_manager.activeQualityGroupChanged.connect(self._onChange) self._machine_manager.extruderChanged.connect(self._onChange) - self._quality_manager.qualitiesUpdated.connect(self._onChange) self._layer_height_unit = "" # This is cached