Switch back to WelcomeWidget when the last database has been closed.

This commit is contained in:
Felix Geyer 2012-05-28 18:53:39 +02:00
parent f145cb69de
commit 5201001f3a

View File

@ -251,6 +251,9 @@ void MainWindow::databaseTabChanged(int tabIndex)
if (tabIndex != -1 && m_ui->stackedWidget->currentIndex() == 2) { if (tabIndex != -1 && m_ui->stackedWidget->currentIndex() == 2) {
switchToDatabases(); switchToDatabases();
} }
else if (tabIndex == -1 && m_ui->stackedWidget->currentIndex() == 0) {
m_ui->stackedWidget->setCurrentIndex(2);
}
} }
void MainWindow::closeEvent(QCloseEvent* event) { void MainWindow::closeEvent(QCloseEvent* event) {