From ddda08b673c11d0b7c9c99dcf07d7aaec78fab5b Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Sun, 11 May 2014 13:46:28 +0200 Subject: [PATCH] Make sure the SQL editor has got the focus after creating a new tab Focus the SQL editor of a newly created tab to make sure it receives keyboard input without need to click it first. On my system this wasn't the case after starting the application, i.e. the first time the SQL tab is used. --- src/MainWindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index b9f04b0c..73b01c4a 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -1161,6 +1161,7 @@ unsigned int MainWindow::openSqlTab(bool resetCounter) w->getEditor()->insertFieldCompleterModels(completerModelsFields); int index = ui->tabSqlAreas->addTab(w, QString("SQL %1").arg(++tabNumber)); ui->tabSqlAreas->setCurrentIndex(index); + w->getEditor()->setFocus(); return index; }