mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
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)
This commit is contained in:
parent
6143906fa4
commit
22b70e1a34
3 changed files with 16 additions and 7 deletions
|
@ -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.
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue