Skip to content

Commit

Permalink
BUG: Remove focus from buttons which caused unintential clicking.
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Dec 17, 2012
1 parent 9bf512d commit 70f1e6d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions skimage/viewer/widgets/history.py
Original file line number Diff line number Diff line change
@@ -29,9 +29,11 @@ def __init__(self, button_width=80):
self.ok = QtGui.QPushButton('OK')
self.ok.clicked.connect(self.update_original_image)
self.ok.setMaximumWidth(button_width)
self.ok.setFocusPolicy(QtCore.Qt.NoFocus)
self.cancel = QtGui.QPushButton('Cancel')
self.cancel.clicked.connect(self.close_plugin)
self.cancel.setMaximumWidth(button_width)
self.cancel.setFocusPolicy(QtCore.Qt.NoFocus)

self.layout = QtGui.QHBoxLayout(self)
self.layout.addStretch()
@@ -61,8 +63,10 @@ def __init__(self, name='Save to:', default_format='png'):

self.save_file = QtGui.QPushButton('File')
self.save_file.clicked.connect(self.save_to_file)
self.save_file.setFocusPolicy(QtCore.Qt.NoFocus)
self.save_stack = QtGui.QPushButton('Stack')
self.save_stack.clicked.connect(self.save_to_stack)
self.save_stack.setFocusPolicy(QtCore.Qt.NoFocus)

self.layout = QtGui.QHBoxLayout(self)
self.layout.addWidget(self.name_label)

0 comments on commit 70f1e6d

Please sign in to comment.