Fixed SQL log containing incorrect lines when executing the current line

- related to #768
- introduced by 649b1790
This commit is contained in:
Iulian Onofrei
2016-09-09 00:46:29 +03:00
parent 7d97688a0a
commit 55d8905b90

View File

@@ -859,8 +859,9 @@ void MainWindow::executeQuery()
int cursor_line, cursor_index;
sqlWidget->getEditor()->getCursorPosition(&cursor_line, &cursor_index);
execution_start_line = cursor_line;
while(cursor_line < sqlWidget->getEditor()->lines())
query += sqlWidget->getEditor()->text(cursor_line++);
query = sqlWidget->getEditor()->text(cursor_line);
singleStep = true;
} else {
// if a part of the query is selected, we will only execute this part