From 5201001f3af1cd94ef70c5f63a6c4a355a0b158f Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Mon, 28 May 2012 18:53:39 +0200 Subject: [PATCH] Switch back to WelcomeWidget when the last database has been closed. --- src/gui/MainWindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 4ac06981..8ab1c1ea 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -251,6 +251,9 @@ void MainWindow::databaseTabChanged(int tabIndex) if (tabIndex != -1 && m_ui->stackedWidget->currentIndex() == 2) { switchToDatabases(); } + else if (tabIndex == -1 && m_ui->stackedWidget->currentIndex() == 0) { + m_ui->stackedWidget->setCurrentIndex(2); + } } void MainWindow::closeEvent(QCloseEvent* event) {