Skip to content

Commit

Permalink
Explicit focus policy so replayer keys work.
Browse files Browse the repository at this point in the history
  • Loading branch information
philroberts committed Dec 17, 2014
1 parent 9400db0 commit f7f7fce
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pyfpdb/GuiReplayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,25 @@ def __init__(self, config, querylist, mainwin, handlist):
self.buttonBox = QHBoxLayout()
self.prevButton = QPushButton("Prev")
self.prevButton.clicked.connect(self.prev_clicked)
self.prevButton.setFocusPolicy(Qt.NoFocus)
self.startButton = QPushButton("Start")
self.startButton.clicked.connect(self.start_clicked)
self.startButton.setFocusPolicy(Qt.NoFocus)
self.endButton = QPushButton("End")
self.endButton.clicked.connect(self.end_clicked)
self.endButton.setFocusPolicy(Qt.NoFocus)
self.playPauseButton = QPushButton("Play")
self.playPauseButton.clicked.connect(self.play_clicked)
self.playPauseButton.setFocusPolicy(Qt.NoFocus)
self.nextButton = QPushButton("Next")
self.nextButton.clicked.connect(self.next_clicked)
self.nextButton.setFocusPolicy(Qt.NoFocus)

self.replayBox.addLayout(self.buttonBox)

self.stateSlider = QSlider(Qt.Horizontal)
self.stateSlider.valueChanged.connect(self.slider_changed)
self.stateSlider.setFocusPolicy(Qt.NoFocus)

self.replayBox.addWidget(self.stateSlider, False)

Expand Down Expand Up @@ -241,6 +247,7 @@ def play_hand(self, handidx):
self.buttonBox.addWidget(btn)
btn.clicked.connect(partial(self.street_clicked, street=street))
btn.setEnabled(street in seenStreets)
btn.setFocusPolicy(Qt.NoFocus)
self.buttonBox.addWidget(self.endButton)
self.buttonBox.addWidget(self.playPauseButton)
self.buttonBox.addWidget(self.nextButton)
Expand Down

0 comments on commit f7f7fce

Please sign in to comment.