From 0c78afc8d6624dbab903859a2a662d92897b18a4 Mon Sep 17 00:00:00 2001 From: Patrick Zimmermann Date: Mon, 18 Feb 2013 19:52:56 +0100 Subject: [PATCH] Simplify a junk of code with a very elegant join snippet by googol++. --- openlp/plugins/songs/forms/songreviewwidget.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/openlp/plugins/songs/forms/songreviewwidget.py b/openlp/plugins/songs/forms/songreviewwidget.py index 81154750a..9799a9ee7 100644 --- a/openlp/plugins/songs/forms/songreviewwidget.py +++ b/openlp/plugins/songs/forms/songreviewwidget.py @@ -119,11 +119,7 @@ class SongReviewWidget(QtGui.QWidget): self.song_authors_content = QtGui.QLabel(self) self.song_authors_content.setObjectName(u'song_authors_content') self.song_authors_content.setWordWrap(True) - authors_text = u'' - for author in self.song.authors: - authors_text += author.display_name + ', ' - if authors_text: - authors_text = authors_text[:-2] + authors_text = u', '.join([author.display_name for author in self.song.authors]) self.song_authors_content.setText(authors_text) self.song_info_form_layout.setWidget(5, QtGui.QFormLayout.FieldRole, self.song_authors_content) # Add verse order widget.