mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
After closing an SQL tab, set focus to the new currently selected tab
Suggested in issue #2025
This commit is contained in:
@@ -1852,6 +1852,11 @@ void MainWindow::closeSqlTab(int index, bool force)
|
||||
// Don't let an empty tab widget
|
||||
if(ui->tabSqlAreas->count() == 0 && !force)
|
||||
openSqlTab(true);
|
||||
|
||||
// Set focus to the currently selected editor tab.
|
||||
SqlExecutionArea* sqlarea = qobject_cast<SqlExecutionArea*>(ui->tabSqlAreas->currentWidget());
|
||||
if(sqlarea)
|
||||
sqlarea->getEditor()->setFocus();
|
||||
}
|
||||
|
||||
int MainWindow::openSqlTab(bool resetCounter)
|
||||
|
||||
Reference in New Issue
Block a user