openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #09237
[Merge] lp:~smpettit/openlp/autoselect into lp:openlp
Stevan Pettit has proposed merging lp:~smpettit/openlp/autoselect into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~smpettit/openlp/autoselect/+merge/62471
Fix bug 788084
Modified code to use object id instead of title
--
https://code.launchpad.net/~smpettit/openlp/autoselect/+merge/62471
Your team OpenLP Core is requested to review the proposed merge of lp:~smpettit/openlp/autoselect into lp:openlp.
=== modified file 'openlp/plugins/custom/forms/editcustomform.py'
--- openlp/plugins/custom/forms/editcustomform.py 2011-05-24 20:47:05 +0000
+++ openlp/plugins/custom/forms/editcustomform.py 2011-05-26 11:48:47 +0000
@@ -116,7 +116,7 @@
log.debug(u'accept')
if self.saveCustom():
Receiver.send_message(u'custom_set_autoselect_item',
- self.customSlide.title)
+ self.customSlide.id)
Receiver.send_message(u'custom_load_list')
QtGui.QDialog.accept(self)
=== modified file 'openlp/plugins/custom/lib/mediaitem.py'
--- openlp/plugins/custom/lib/mediaitem.py 2011-05-26 06:23:22 +0000
+++ openlp/plugins/custom/lib/mediaitem.py 2011-05-26 11:48:47 +0000
@@ -147,7 +147,7 @@
QtCore.Qt.UserRole, QtCore.QVariant(custom_slide.id))
self.listView.addItem(custom_name)
# Auto-select the item if name has been set
- if custom_slide.title == self.autoSelectItem:
+ if custom_slide.id == self.autoSelectItem:
self.listView.setCurrentItem(custom_name)
def onNewClick(self):
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2011-05-24 20:47:05 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2011-05-26 11:48:47 +0000
@@ -696,9 +696,9 @@
self.clearCaches()
if self._validate_song():
self.saveSong()
- Receiver.send_message(u'songs_set_autoselect_item',
- unicode(self.titleEdit.text()))
+ Receiver.send_message(u'songs_set_autoselect_item',self.song.id)
Receiver.send_message(u'songs_load_list')
+ self.song = None
QtGui.QDialog.accept(self)
def saveSong(self, preview=False):
@@ -756,8 +756,6 @@
self.song.topics.append(self.manager.get_object(Topic, topicId))
clean_song(self.manager, self.song)
self.manager.save_object(self.song)
- if not preview:
- self.song = None
def _processLyrics(self):
"""
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py 2011-05-26 06:23:22 +0000
+++ openlp/plugins/songs/lib/mediaitem.py 2011-05-26 11:48:47 +0000
@@ -245,7 +245,7 @@
song_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(song.id))
self.listView.addItem(song_name)
# Auto-select the item if name has been set
- if song.title == self.autoSelectItem :
+ if song.id == self.autoSelectItem :
self.listView.setCurrentItem(song_name)
def displayResultsAuthor(self, searchresults):
Follow ups