pipeline fix

This commit is contained in:
STEPHANVS 2022-02-14 15:07:19 +01:00
parent c80d8fbcfb
commit 3aa67ec2f2
No known key found for this signature in database
GPG Key ID: 4EFE47E471FD62A9
1 changed files with 4 additions and 5 deletions

View File

@ -250,7 +250,7 @@ class EditSongForm(QtWidgets.QDialog, Ui_EditSongDialog, RegistryProperties):
item = self.verse_list_widget.item(i, 0) item = self.verse_list_widget.item(i, 0)
tags = self.find_tags.findall(item.text()) tags = self.find_tags.findall(item.text())
stripped_text = re.sub(r'\[---\]', "\n", re.sub(r'\[--}{--\]', "\n", item.text())) stripped_text = re.sub(r'\[---\]', "\n", re.sub(r'\[--}{--\]', "\n", item.text()))
r = re.compile('\[(.*?)\]') r = re.compile(r'\[(.*?)\]')
for match in r.finditer(stripped_text): for match in r.finditer(stripped_text):
chords += match[1] chords += match[1]
field = item.data(QtCore.Qt.UserRole) field = item.data(QtCore.Qt.UserRole)
@ -260,10 +260,9 @@ class EditSongForm(QtWidgets.QDialog, Ui_EditSongDialog, RegistryProperties):
field2=field[1:])) field2=field[1:]))
if Registry().get('settings').value('songs/enable chords') and not chords[0].startswith("="): if Registry().get('settings').value('songs/enable chords') and not chords[0].startswith("="):
QtWidgets.QMessageBox.warning(self, translate('SongsPlugin.EditVerseForm', 'Song key warning'), QtWidgets.QMessageBox.warning(self, translate('SongsPlugin.EditVerseForm', 'Song key warning'),
translate('SongsPlugin.EditVerseForm', translate('SongsPlugin.EditVerseForm', 'No song key is present or song key '
'No song key is present or song key is not the first ' 'is not the first chord.\nFor optimal chord experience, please, '
'chord.\nFor optimal chord experience, please, include a ' 'include a song key\nbefore any chord. Ex.: [=G]'))
'song key before any chord. Ex.: [=G]'))
if misplaced_tags: if misplaced_tags:
critical_error_message_box( critical_error_message_box(
message=translate('SongsPlugin.EditSongForm', message=translate('SongsPlugin.EditSongForm',