mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Activate corresponding tab when closing a database.
This commit is contained in:
parent
09248fdb14
commit
07aa46c2d6
@ -257,6 +257,8 @@ bool DatabaseTabWidget::closeDatabase(int index)
|
|||||||
index = currentIndex();
|
index = currentIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setCurrentIndex(index);
|
||||||
|
|
||||||
return closeDatabase(indexDatabase(index));
|
return closeDatabase(indexDatabase(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,6 +267,8 @@ void DatabaseTabWidget::closeDatabaseFromSender()
|
|||||||
Q_ASSERT(sender());
|
Q_ASSERT(sender());
|
||||||
DatabaseWidget* dbWidget = static_cast<DatabaseWidget*>(sender());
|
DatabaseWidget* dbWidget = static_cast<DatabaseWidget*>(sender());
|
||||||
Database* db = databaseFromDatabaseWidget(dbWidget);
|
Database* db = databaseFromDatabaseWidget(dbWidget);
|
||||||
|
int index = databaseIndex(db);
|
||||||
|
setCurrentIndex(index);
|
||||||
closeDatabase(db);
|
closeDatabase(db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user