diff options
Diffstat (limited to 'src/ui/cameraui.cpp')
-rw-r--r-- | src/ui/cameraui.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/cameraui.cpp b/src/ui/cameraui.cpp index 82059bb..fe65ee5 100644 --- a/src/ui/cameraui.cpp +++ b/src/ui/cameraui.cpp @@ -146,7 +146,11 @@ void CameraUi::emitCameraDataChange() const void CameraUi::showCameraInfo() { bool editingEnabled = mCameras->count() != 0; - enableCameraControls(editingEnabled); + // workaround for calling this from another thread (scripts): + // always perform the setEnabled calls in the gui thread - + // setEnabled calls sendEvent! + QMetaObject::invokeMethod(this, "enableCameraControls", Qt::QueuedConnection, + Q_ARG(bool, editingEnabled)); if (!editingEnabled) return; |