Skip to content

Commit

Permalink
Merge pull request #5893 from anntzer/lineedit-cursorposition
Browse files Browse the repository at this point in the history
FIX: Show significant digits by default in QLineEdit.
  • Loading branch information
tacaswell committed Jan 23, 2016
1 parent 3fc9364 commit aa13812
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/matplotlib/backends/qt_editor/formlayout.py
Expand Up @@ -296,6 +296,7 @@ def setup(self):
field.setCheckState(QtCore.Qt.Unchecked)
elif isinstance(value, float):
field = QtWidgets.QLineEdit(repr(value), self)
field.setCursorPosition(0)
field.setValidator(QtGui.QDoubleValidator(field))
dialog = self.get_dialog()
dialog.register_float_field(field)
Expand Down

0 comments on commit aa13812

Please sign in to comment.