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
wilder-5.14
David Edmundson 10 years ago
parent 6396bcd124
commit 6d9c6adae2
  1. 10
      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)

Loading…
Cancel
Save