mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Fix #12193 - problem with update of SQL query in DB manager
In the scenario described in the bug report, the selected text was empty, but editor's hasSelectedText() would still return True
This commit is contained in:
parent
d34eaf0759
commit
c3d9f10cbe
@ -140,10 +140,8 @@ class DlgSqlWindow(QDialog, Ui_Dialog):
|
||||
|
||||
def executeSql(self):
|
||||
|
||||
sql = ""
|
||||
if self.editSql.hasSelectedText():
|
||||
sql = self.editSql.selectedText()
|
||||
else:
|
||||
sql = self.editSql.selectedText()
|
||||
if len(sql) == 0:
|
||||
sql = self.editSql.text()
|
||||
|
||||
if sql == "":
|
||||
|
Loading…
x
Reference in New Issue
Block a user