mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-13 10:09:28 -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
1 changed files with 7 additions and 2 deletions
|
@ -241,7 +241,12 @@ void MainWindow::showAboutDialog()
|
||||||
|
|
||||||
void MainWindow::switchToDatabases()
|
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()
|
void MainWindow::switchToSettings()
|
||||||
|
@ -253,7 +258,7 @@ void MainWindow::switchToSettings()
|
||||||
void MainWindow::databaseTabChanged(int tabIndex)
|
void MainWindow::databaseTabChanged(int tabIndex)
|
||||||
{
|
{
|
||||||
if (tabIndex != -1 && m_ui->stackedWidget->currentIndex() == 2) {
|
if (tabIndex != -1 && m_ui->stackedWidget->currentIndex() == 2) {
|
||||||
switchToDatabases();
|
m_ui->stackedWidget->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
else if (tabIndex == -1 && m_ui->stackedWidget->currentIndex() == 0) {
|
else if (tabIndex == -1 && m_ui->stackedWidget->currentIndex() == 0) {
|
||||||
m_ui->stackedWidget->setCurrentIndex(2);
|
m_ui->stackedWidget->setCurrentIndex(2);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue