pipeline fixes

This commit is contained in:
STEPHANVS 2022-02-06 01:37:30 +01:00
parent 3175824ac5
commit 93ed31e54d
No known key found for this signature in database
GPG Key ID: 4EFE47E471FD62A9
2 changed files with 16 additions and 17 deletions

View File

@ -83,7 +83,6 @@ class Ui_EditVerseDialog(object):
self.transpose_down_button.setIcon(UiIcons().arrow_down)
self.transpose_down_button.setObjectName('transpose_down')
self.transpose_layout.addWidget(self.transpose_down_button)
#self.dialog_layout.addLayout(self.transpose_layout)
self.dialog_layout.addWidget(self.transpose_widget)
self.button_box = create_button_box(edit_verse_dialog, 'button_box', ['cancel', 'ok'])
self.dialog_layout.addWidget(self.button_box)

View File

@ -21,7 +21,6 @@
import logging
import re
from warnings import WarningMessage
from PyQt5 import QtCore, QtGui, QtWidgets
@ -123,7 +122,7 @@ class EditVerseForm(QtWidgets.QDialog, Ui_EditVerseDialog):
The transpose up button clicked
"""
try:
lyrics_stripped = re.sub(r'\[---\]',"\n", re.sub(r'---\[.*?\]---', "\n", re.sub(r'\[--}{--\]', "\n",
lyrics_stripped = re.sub(r'\[---\]', "\n", re.sub(r'---\[.*?\]---', "\n", re.sub(r'\[--}{--\]', "\n",
self.verse_text_edit.toPlainText())))
transposed_lyrics = transpose_lyrics(self.verse_text_edit.toPlainText(), 1)
self.verse_text_edit.setPlainText(transposed_lyrics)
@ -144,13 +143,12 @@ class EditVerseForm(QtWidgets.QDialog, Ui_EditVerseDialog):
self.verse_text_edit.setFocus()
self.verse_text_edit.moveCursor(QtGui.QTextCursor.End)
def on_transpose_down_button_clicked(self):
"""
The transpose down button clicked
"""
try:
lyrics_stripped = re.sub(r'\[---\]',"\n", re.sub(r'---\[.*?\]---', "\n", re.sub(r'\[--}{--\]', "\n",
lyrics_stripped = re.sub(r'\[---\]', "\n", re.sub(r'---\[.*?\]---', "\n", re.sub(r'\[--}{--\]', "\n",
self.verse_text_edit.toPlainText())))
transposed_lyrics = transpose_lyrics(self.verse_text_edit.toPlainText(), -1)
self.verse_text_edit.setPlainText(transposed_lyrics)
@ -254,7 +252,9 @@ class EditVerseForm(QtWidgets.QDialog, Ui_EditVerseDialog):
"""
if Registry().get('settings').value('songs/enable chords'):
try:
lyrics_stripped = re.sub(r'\[---\]',"\n", re.sub(r'---\[.*?\]---', "\n", re.sub(r'\[--}{--\]', "\n",
lyrics_stripped = re.sub(r'\[---\]', "\n",
re.sub(r'---\[.*?\]---', "\n",
re.sub(r'\[--}{--\]', "\n",
self.verse_text_edit.toPlainText())))
if not re.search(r'\[(.*?)\]', lyrics_stripped)[1].startswith("="):
QtWidgets.QMessageBox.warning(self, translate('SongsPlugin.EditVerseForm', 'Song key warning'),