mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Switch back to WelcomeWidget when settings widget is closed and there are no open databases.
This commit is contained in:
parent
cf5f56af6f
commit
2448976643
@ -241,7 +241,12 @@ void MainWindow::showAboutDialog()
|
||||
|
||||
void MainWindow::switchToDatabases()
|
||||
{
|
||||
m_ui->stackedWidget->setCurrentIndex(0);
|
||||
if (m_ui->tabWidget->currentIndex() == -1) {
|
||||
m_ui->stackedWidget->setCurrentIndex(2);
|
||||
}
|
||||
else {
|
||||
m_ui->stackedWidget->setCurrentIndex(0);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::switchToSettings()
|
||||
@ -253,7 +258,7 @@ void MainWindow::switchToSettings()
|
||||
void MainWindow::databaseTabChanged(int tabIndex)
|
||||
{
|
||||
if (tabIndex != -1 && m_ui->stackedWidget->currentIndex() == 2) {
|
||||
switchToDatabases();
|
||||
m_ui->stackedWidget->setCurrentIndex(0);
|
||||
}
|
||||
else if (tabIndex == -1 && m_ui->stackedWidget->currentIndex() == 0) {
|
||||
m_ui->stackedWidget->setCurrentIndex(2);
|
||||
|
Loading…
Reference in New Issue
Block a user