From 9f1c20c8aa6e78cea177a1940cc4d0bdbcd3abb6 Mon Sep 17 00:00:00 2001 From: daid Date: Mon, 17 Jun 2013 08:50:03 +0200 Subject: [PATCH] Only update the slicing progress bar if there was more then 1% change on it. --- Cura/gui/sceneView.py | 3 +++ Cura/gui/util/openglGui.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Cura/gui/sceneView.py b/Cura/gui/sceneView.py index a7a7e052..184eb917 100644 --- a/Cura/gui/sceneView.py +++ b/Cura/gui/sceneView.py @@ -414,6 +414,9 @@ class SceneView(openglGui.glGuiPanel): profile.resetTempOverride() def _updateSliceProgress(self, progressValue, ready): + if not ready: + if self.printButton.getProgressBar() is not None and progressValue >= 0.0 and abs(self.printButton.getProgressBar() - progressValue) < 0.01: + return self.printButton.setDisabled(not ready) if progressValue >= 0.0: self.printButton.setProgressBar(progressValue) diff --git a/Cura/gui/util/openglGui.py b/Cura/gui/util/openglGui.py index aee5ac97..26ae119a 100644 --- a/Cura/gui/util/openglGui.py +++ b/Cura/gui/util/openglGui.py @@ -409,6 +409,9 @@ class glButton(glGuiControl): def setProgressBar(self, value): self._progressBar = value + def getProgressBar(self): + return self._progressBar + def setBottomText(self, value): self._altTooltip = value -- 2.30.2