Skip to content
Permalink
Browse files

[db manager] shows vertical scrollbar as needed and set focus to the …

…query editor after clearing
  • Loading branch information
slarosa committed Apr 28, 2014
1 parent 8120f30 commit d0bf3dbfe16ebba395abe8970cb9a4872675ad2d
Showing with 2 additions and 0 deletions.
  1. +2 −0 python/plugins/db_manager/dlg_sql_window.py
@@ -48,6 +48,7 @@ def __init__(self, iface, db, parent=None):
self.restoreGeometry(settings.value("/DB_Manager/sqlWindow/geometry", QByteArray(), type=QByteArray))

self.editSql.setFocus()
self.editSql.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
self.editSql.initCompleter(self.db)

# allow to copy results
@@ -125,6 +126,7 @@ def loadAsLayerToggled(self, checked):

def clearSql(self):
self.editSql.clear()
self.editSql.setFocus()

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

0 comments on commit d0bf3db

Please sign in to comment.
You can’t perform that action at this time.