From a8bcc2ee52e31f2ab3c175bba05167435a17fbdb Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Sun, 28 May 2017 20:59:52 +0300 Subject: [PATCH] Fix empty statusbar showed after app restarted --- src/gui/mainwindow.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 77574aacb..1e54f37b8 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -1241,17 +1241,17 @@ void MainWindow::optionsSaved() void MainWindow::showStatusBar(bool show) { - if (show && !m_statusBar) { + if (!show) { + // Remove status bar + setStatusBar(nullptr); + } + else if (!m_statusBar) { // Create status bar m_statusBar = new StatusBar; connect(m_statusBar.data(), &StatusBar::connectionButtonClicked, this, &MainWindow::showConnectionSettings); connect(m_statusBar.data(), &StatusBar::alternativeSpeedsButtonClicked, this, &MainWindow::toggleAlternativeSpeeds); setStatusBar(m_statusBar); } - else if (!show && m_statusBar) { - // Remove status bar - setStatusBar(nullptr); - } } void MainWindow::loadPreferences(bool configureSession)