From 66047f7daa5223259cb1e47ec5f833f55c63dec9 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 22 Mar 2023 10:22:21 +0100 Subject: [PATCH] Gui: issue #8939: timers are moved between non-QThreads --- src/Gui/Tree.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index 7cf6c32644..a23741fdb5 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -3002,6 +3002,12 @@ void TreeWidget::onSelectTimer() { void TreeWidget::onSelectionChanged(const SelectionChanges& msg) { + // When running from a different thread Qt will raise a warning + // when trying to start the QTimer + if (Q_UNLIKELY(thread() != QThread::currentThread())) { + return; + } + switch (msg.Type) { case SelectionChanges::AddSelection: