Skip to content

Commit

Permalink
widgets: focus text fields in refspec dialogs
Browse files Browse the repository at this point in the history
Give focus to the text input fields in the GitRef dialogs that use the
text completion widgets.

Signed-off-by: David Aguilar <davvid@gmail.com>
  • Loading branch information
davvid committed Oct 7, 2017
1 parent 0b6de83 commit 67e3a54
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cola/widgets/completion.py
Expand Up @@ -664,10 +664,7 @@ def __init__(self, lineedit, title, text, parent, icon=None):

self.label = QtWidgets.QLabel()
self.label.setText(title)

self.lineedit = lineedit()
self.setFocusProxy(self.lineedit)

self.ok_button = qtutils.ok_button(text, icon=icon, enabled=False)
self.close_button = qtutils.close_button()

Expand All @@ -685,6 +682,9 @@ def __init__(self, lineedit, title, text, parent, icon=None):
qtutils.connect_button(self.ok_button, self.accept)
qtutils.connect_button(self.close_button, self.reject)

self.setFocusProxy(self.lineedit)
self.lineedit.setFocus(True)

def text(self):
return self.lineedit.text()

Expand Down

0 comments on commit 67e3a54

Please sign in to comment.