Correction for spinbox auto-selection without suffix
This commit is contained in:
parent
2d78ce6f87
commit
ad10b06652
@ -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):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user