Skip to content

Commit

Permalink
Merge pull request #1741 from Gustry/master
Browse files Browse the repository at this point in the history
[DB Manager] Allow execution of the selected text in the SQL window
  • Loading branch information
NathanW2 committed Dec 21, 2014
2 parents 099e0b9 + 06c6ca0 commit df06057
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion python/plugins/db_manager/dlg_sql_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,13 @@ def clearSql(self):
self.editSql.setFocus()

def executeSql(self):
sql = self.editSql.text()

sql = ""
if self.editSql.hasSelectedText():
sql = self.editSql.selectedText()
else:
sql = self.editSql.text()

if sql == "":
return

Expand Down

0 comments on commit df06057

Please sign in to comment.