From 045f4c51fa06c6c3ee2bdebc7ad1620cf4d41254 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 7 Jan 2020 10:57:15 +0100 Subject: [PATCH] Fix BaseMaterialsModel's QTimer lifecycle --- cura/Machines/Models/BaseMaterialsModel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Machines/Models/BaseMaterialsModel.py b/cura/Machines/Models/BaseMaterialsModel.py index db660704b5..5e672faa12 100644 --- a/cura/Machines/Models/BaseMaterialsModel.py +++ b/cura/Machines/Models/BaseMaterialsModel.py @@ -45,7 +45,7 @@ class BaseMaterialsModel(ListModel): # can be caused in the middle of a XMLMaterial loading, and the material container we try to find may not be # in the system yet. This will cause an infinite recursion of (1) trying to load a material, (2) trying to # update the material model, (3) cannot find the material container, load it, (4) repeat #1. - self._update_timer = QTimer() + self._update_timer = QTimer(self) self._update_timer.setInterval(100) self._update_timer.setSingleShot(True) self._update_timer.timeout.connect(self._update)