Skip to content

Commit

Permalink
Clicking a node in the list creates it
Browse files Browse the repository at this point in the history
  • Loading branch information
dbr committed Jan 9, 2012
1 parent 4bc6b97 commit ef8789b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tabtabtab.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,9 @@ def __init__(self, on_create = None, parent = None, winflags = None):
self.input.textChanged.connect(lambda: self.move_selection(where="first"))
self.move_selection(where = "first") # Set initial selection

# When enter/tab is pressed, create node
# Create node when enter/tab is pressed, or item is clicked
self.input.returnPressed.connect(self.create)
# TODO: Do same thing when clicked
self.things.clicked.connect(self.create)

# When esc pressed, close
self.input.cancelled.connect(self.close)
Expand Down Expand Up @@ -423,6 +423,7 @@ def show(self):
create previously created node (instead of the most popular)
"""
self.input.selectAll()
self.input.setFocus()
super(TabTabTabWidget, self).show()

def close(self):
Expand Down

0 comments on commit ef8789b

Please sign in to comment.