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>2019-02-19 19:06:48 +0300
committerJaime van Kessel <nallath@gmail.com>2019-02-19 19:06:48 +0300
commit22b70e1a345361674c9fb34fa97c62d807606062 (patch)
treea963bcd448a45d40adede4a57eaf589fe9b86be6 /plugins/ModelChecker
parent6143906fa403b1d94876b9d651154047912ec33b (diff)
Ignore sceneChange signals if the camera triggered them in some places
These places weren't interested in all changes. They can probably be more strict, but the camera is a really safe bet (and already greatly decreases the number of updates, especially when just moving the camera)
Diffstat (limited to 'plugins/ModelChecker')
-rw-r--r--plugins/ModelChecker/ModelChecker.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/ModelChecker/ModelChecker.py b/plugins/ModelChecker/ModelChecker.py
index d2c2eefac2..1913f39d96 100644
--- a/plugins/ModelChecker/ModelChecker.py
+++ b/plugins/ModelChecker/ModelChecker.py
@@ -9,6 +9,7 @@ from UM.Application import Application
from UM.Extension import Extension
from UM.Logger import Logger
from UM.Message import Message
+from UM.Scene.Camera import Camera
from UM.i18n import i18nCatalog
from UM.PluginRegistry import PluginRegistry
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
@@ -35,7 +36,12 @@ class ModelChecker(QObject, Extension):
## Pass-through to allow UM.Signal to connect with a pyqtSignal.
def _onChanged(self, *args, **kwargs):
- self.onChanged.emit()
+ # Ignore camera updates.
+ if len(args) == 0:
+ self.onChanged.emit()
+ return
+ if not isinstance(args[0], Camera):
+ self.onChanged.emit()
## Called when plug-ins are initialized.
#