From 6d9c6adae2e7203f7026c5dbfcd6f4705edaab5e Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 10 Oct 2016 11:33:05 +0100 Subject: [PATCH] If we manually invoke ::restore remove the pending timer to call restore Summary: Also change positionPanelTimer to not call positionPanel() manually as restore already does this. Test Plan: Bshah Reviewers: #plasma Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D3000 --- shell/panelview.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shell/panelview.cpp b/shell/panelview.cpp index f3c3cd0ce..23107bb6d 100644 --- a/shell/panelview.cpp +++ b/shell/panelview.cpp @@ -78,11 +78,7 @@ PanelView::PanelView(ShellCorona *corona, QScreen *targetScreen, QWindow *parent m_positionPaneltimer.setSingleShot(true); m_positionPaneltimer.setInterval(150); - connect(&m_positionPaneltimer, &QTimer::timeout, - this, [this] () { - restore(); - positionPanel(); - }); + connect(&m_positionPaneltimer, &QTimer::timeout, this, &PanelView::restore); m_unhideTimer.setSingleShot(true); m_unhideTimer.setInterval(500); @@ -517,6 +513,10 @@ void PanelView::restore() emit minimumLengthChanged(); emit offsetChanged(); emit alignmentChanged(); + + //::restore might have been called directly before the timer fires + // at which point we don't still need the timer + m_positionPaneltimer.stop(); } void PanelView::showConfigurationInterface(Plasma::Applet *applet)