Commit ad10b066 authored by Luke Campagnola's avatar Luke Campagnola
Browse files

Correction for spinbox auto-selection without suffix

parent 2d78ce6f
......@@ -240,11 +240,14 @@ class SpinBox(QtGui.QAbstractSpinBox):
"""
le = self.lineEdit()
text = asUnicode(le.text())
try:
index = text.index(' ')
except ValueError:
return
le.setSelection(0, index)
if self.opts['suffix'] == '':
le.setSelection(0, len(text))
else:
try:
index = text.index(' ')
except ValueError:
return
le.setSelection(0, index)
def value(self):
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment