mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
Proper SQL Execution behaviour when DB is closed
Remove completion for identifiers when closing DB. Do not enable the execute SQL actions when the DB is closed. See issue #1800
This commit is contained in:
@@ -922,6 +922,9 @@ bool MainWindow::fileClose()
|
||||
ui->editLogUser->clear();
|
||||
ui->editLogErrorLog->clear();
|
||||
|
||||
// Remove completion for identifiers
|
||||
SqlTextEdit::sqlLexer->setTableNames(SqlUiLexer::QualifiedTablesMap());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2253,8 +2256,8 @@ void MainWindow::changeSqlTab(int index)
|
||||
{
|
||||
// Not running a query
|
||||
|
||||
ui->actionSqlExecuteLine->setEnabled(true);
|
||||
ui->actionExecuteSql->setEnabled(true);
|
||||
ui->actionSqlExecuteLine->setEnabled(db.isOpen());
|
||||
ui->actionExecuteSql->setEnabled(db.isOpen());
|
||||
ui->actionSqlStop->setEnabled(false);
|
||||
} else {
|
||||
// Running a query
|
||||
|
||||
Reference in New Issue
Block a user