Activate corresponding tab when closing a database.

This commit is contained in:
Florian Geyer 2012-05-02 22:39:45 +02:00
parent 09248fdb14
commit 07aa46c2d6

View File

@ -257,6 +257,8 @@ bool DatabaseTabWidget::closeDatabase(int index)
index = currentIndex();
}
setCurrentIndex(index);
return closeDatabase(indexDatabase(index));
}
@ -265,6 +267,8 @@ void DatabaseTabWidget::closeDatabaseFromSender()
Q_ASSERT(sender());
DatabaseWidget* dbWidget = static_cast<DatabaseWidget*>(sender());
Database* db = databaseFromDatabaseWidget(dbWidget);
int index = databaseIndex(db);
setCurrentIndex(index);
closeDatabase(db);
}