From 805b7a83eb7475653f8b30f4502050a058d7c9c8 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Wed, 8 Jun 2016 21:06:04 +0200 Subject: [PATCH] Small fixes --- openlp/plugins/songs/forms/editverseform.py | 4 ++++ openlp/plugins/songs/lib/__init__.py | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/openlp/plugins/songs/forms/editverseform.py b/openlp/plugins/songs/forms/editverseform.py index 24c026320..02241769a 100644 --- a/openlp/plugins/songs/forms/editverseform.py +++ b/openlp/plugins/songs/forms/editverseform.py @@ -103,6 +103,8 @@ class EditVerseForm(QtWidgets.QDialog, Ui_EditVerseDialog): """ transposed_lyrics = transpose_lyrics(self.verse_text_edit.toPlainText(), 1) self.verse_text_edit.setPlainText(transposed_lyrics) + self.verse_text_edit.setFocus() + self.verse_text_edit.moveCursor(QtGui.QTextCursor.End) def on_transepose_down_button_clicked(self): """ @@ -110,6 +112,8 @@ class EditVerseForm(QtWidgets.QDialog, Ui_EditVerseDialog): """ transposed_lyrics = transpose_lyrics(self.verse_text_edit.toPlainText(), -1) self.verse_text_edit.setPlainText(transposed_lyrics) + self.verse_text_edit.setFocus() + self.verse_text_edit.moveCursor(QtGui.QTextCursor.End) def update_suggested_verse_number(self): """ diff --git a/openlp/plugins/songs/lib/__init__.py b/openlp/plugins/songs/lib/__init__.py index 5cf5f0bfc..3e9f75327 100644 --- a/openlp/plugins/songs/lib/__init__.py +++ b/openlp/plugins/songs/lib/__init__.py @@ -619,15 +619,10 @@ def transpose_chord(chord, transpose_value, notation): notes_flat_notation['neo-latin'] = ['Do','Reb','Re','Mib','Fab','Fa','Solb','Sol','Lab','La','Sib','Si'] chord_split = chord.replace('♭', 'b').split('/[\/\(\)]/') transposed_chord = '' - note = '' - notenumber = -1 - rest = '' - current_chord = '' last_chord = '' notes_sharp = notes_sharp_notation[notation] notes_flat = notes_flat_notation[notation] notes_preferred = ['b','#','#','#','#','#','#','#','#','#','#','#'] - chord_notes = [] for i in range(0, len(chord_split)): if i > 0: transposed_chord += '/'