Skip to content

Commit

Permalink
Do not close tabs if the user cancels the close of the project
Browse files Browse the repository at this point in the history
See issue #3662
  • Loading branch information
mgrojo committed Jun 18, 2024
1 parent ed18702 commit e8445ae
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -799,11 +799,12 @@ bool MainWindow::closeFiles()

bool projectClosed = closeProject();

// Now all tabs can be closed at once without asking user.
// Close tabs in reverse order (so indexes are not changed in the process).
for(int i=ui->tabSqlAreas->count()-1; i>=0; i--)
closeSqlTab(i, /* force */ true, /* askSaving */ false);

if (projectClosed) {
// Now all tabs can be closed at once without asking user.
// Close tabs in reverse order (so indexes are not changed in the process).
for(int i=ui->tabSqlAreas->count()-1; i>=0; i--)
closeSqlTab(i, /* force */ true, /* askSaving */ false);
}
return projectClosed;
}

Expand Down

0 comments on commit e8445ae

Please sign in to comment.