When setting the verseorder to uppercase, remember the cursor position. Fixes bug 1536411.

Fixes: https://launchpad.net/bugs/1536411
This commit is contained in:
Tomas Groth 2016-01-22 21:04:31 +01:00
parent 9415018899
commit 692a08f888
1 changed files with 2 additions and 0 deletions

View File

@ -843,7 +843,9 @@ class EditSongForm(QtWidgets.QDialog, Ui_EditSongDialog, RegistryProperties):
:param text: The text of the verse order edit (ignored).
"""
# First make sure that all letters entered in the verse order field are uppercase
pos = self.verse_order_edit.cursorPosition()
self.verse_order_edit.setText(text.upper())
self.verse_order_edit.setCursorPosition(pos)
# Extract all verses which were used in the order.
verses_in_order = self._extract_verse_order(self.verse_order_edit.text())
# Find the verses which were not used in the order.