From 3df225df3d89a34ca668d6b9b0e1e5ca4de59e40 Mon Sep 17 00:00:00 2001 From: bgbsww <120601209+bgbsww@users.noreply.github.com> Date: Thu, 2 Nov 2023 11:32:32 -0400 Subject: [PATCH] Fix #11032 flickering when switching to Part Design * Remove unneeded timer on taskview updates to fix #11032 * Remove obsoleted class member --- src/Gui/TaskView/TaskView.cpp | 9 --------- src/Gui/TaskView/TaskView.h | 2 -- 2 files changed, 11 deletions(-) diff --git a/src/Gui/TaskView/TaskView.cpp b/src/Gui/TaskView/TaskView.cpp index 9e5a0a30e3..0dbb9fccc9 100644 --- a/src/Gui/TaskView/TaskView.cpp +++ b/src/Gui/TaskView/TaskView.cpp @@ -301,9 +301,6 @@ TaskView::TaskView(QWidget *parent) (std::bind(&Gui::TaskView::TaskView::slotRedoDocument, this, sp::_1)); //NOLINTEND - this->timer = new QTimer(this); - this->timer->setSingleShot(true); - QObject::connect(this->timer, &QTimer::timeout, [this](){onUpdateWatcher();}); updateWatcher(); } @@ -609,11 +606,6 @@ void TaskView::removeDialog() } void TaskView::updateWatcher(void) -{ - this->timer->start(200); -} - -void TaskView::onUpdateWatcher(void) { if (ActiveCtrl || ActiveDialog) return; @@ -623,7 +615,6 @@ void TaskView::onUpdateWatcher(void) if (panel && panel->ActiveWatcher.size()) takeTaskWatcher(panel); } - this->timer->stop(); // In case a child of the TaskView has the focus and get hidden we have // to make sure to set the focus on a widget that won't be hidden or diff --git a/src/Gui/TaskView/TaskView.h b/src/Gui/TaskView/TaskView.h index 44a336dfcb..3504cb1c99 100644 --- a/src/Gui/TaskView/TaskView.h +++ b/src/Gui/TaskView/TaskView.h @@ -171,7 +171,6 @@ protected Q_SLOTS: void reject(); void helpRequested(); void clicked (QAbstractButton * button); - void onUpdateWatcher(); private: void triggerMinimumSizeHint(); @@ -200,7 +199,6 @@ protected: QSint::ActionPanel* taskPanel; TaskDialog *ActiveDialog; TaskEditControl *ActiveCtrl; - QTimer *timer; Connection connectApplicationActiveDocument; Connection connectApplicationDeleteDocument;