mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-17 21:04:19 -05: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()
|
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…
x
Reference in New Issue
Block a user