summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmundson <[email protected]>2016-10-10 11:33:05 +0100
committerDavid Edmundson <[email protected]>2016-10-10 11:35:10 +0100
commit6d9c6adae2e7203f7026c5dbfcd6f4705edaab5e (patch)
tree2e51705683747f531929497f016467a9a39cb378
parent6396bcd1243bcfa40ffad9f1cd2cc7c32c2bbe1d (diff)
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
-rw-r--r--shell/panelview.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/shell/panelview.cpp b/shell/panelview.cpp
index f3c3cd0..23107bb 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)