Stevan Pettit has proposed merging lp:~smpettit/openlp/bug-789102 into 
lp:openlp.

Requested reviews:
  Raoul Snyman (raoul-snyman)
  Andreas Preikschat (googol-hush)

For more details, see:
https://code.launchpad.net/~smpettit/openlp/bug-789102/+merge/62993

Fixed bug-789102.  Made changes to song and custom mediaitems and edit forms to 
not autoselect mediamanager items when doing item edits from preview or 
slidecontroller.

Removed code from edit forms that triggered mediaitem list updates.  Added code 
to mediaitemmanger to update list after edit is performed.
-- 
https://code.launchpad.net/~smpettit/openlp/bug-789102/+merge/62993
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py	2011-05-28 18:47:14 +0000
+++ openlp/core/lib/mediamanageritem.py	2011-05-31 14:12:33 +0000
@@ -453,7 +453,8 @@
         """
         if QtCore.QSettings().value(u'advanced/single click preview',
             QtCore.QVariant(False)).toBool() and self.quickPreviewAllowed \
-            and self.listView.selectedIndexes():
+            and self.listView.selectedIndexes() \
+            and self.auto_select_id == -1:
             self.onPreviewClick(True)
 
     def onPreviewClick(self, keepFocus=False):

=== modified file 'openlp/plugins/custom/forms/editcustomform.py'
--- openlp/plugins/custom/forms/editcustomform.py	2011-05-28 21:23:07 +0000
+++ openlp/plugins/custom/forms/editcustomform.py	2011-05-31 14:12:33 +0000
@@ -115,7 +115,6 @@
     def accept(self):
         log.debug(u'accept')
         if self.saveCustom():
-            Receiver.send_message(u'custom_load_list')
             QtGui.QDialog.accept(self)
 
     def saveCustom(self):

=== modified file 'openlp/plugins/custom/lib/mediaitem.py'
--- openlp/plugins/custom/lib/mediaitem.py	2011-05-28 19:38:19 +0000
+++ openlp/plugins/custom/lib/mediaitem.py	2011-05-31 14:12:33 +0000
@@ -160,6 +160,7 @@
         self.edit_custom_form.loadCustom(0)
         self.edit_custom_form.exec_()
         self.initialise()
+        self.onSelectionChange()
 
     def onRemoteEditClear(self):
         self.remoteTriggered = None
@@ -179,6 +180,8 @@
             self.remoteTriggered = remote_type
             self.edit_custom_form.loadCustom(custom_id, (remote_type == u'P'))
             self.edit_custom_form.exec_()
+            self.auto_select_id = -1
+            self.initialise()
 
     def onEditClick(self):
         """
@@ -189,6 +192,7 @@
             item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
             self.edit_custom_form.loadCustom(item_id, False)
             self.edit_custom_form.exec_()
+            self.auto_select_id = -1
             self.initialise()
 
     def onDeleteClick(self):

=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py	2011-05-28 19:38:19 +0000
+++ openlp/plugins/songs/forms/editsongform.py	2011-05-31 14:12:33 +0000
@@ -696,7 +696,6 @@
         self.clearCaches()
         if self._validate_song():
             self.saveSong()
-            Receiver.send_message(u'songs_load_list')
             self.song = None
             QtGui.QDialog.accept(self)
 

=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py	2011-05-30 20:03:09 +0000
+++ openlp/plugins/songs/lib/mediaitem.py	2011-05-31 14:12:33 +0000
@@ -300,6 +300,8 @@
         log.debug(u'onNewClick')
         self.edit_song_form.newSong()
         self.edit_song_form.exec_()
+        self.onSongListLoad()
+        self.onSelectionChange()
 
     def onSongMaintenanceClick(self):
         self.song_maintenance_form.exec_()
@@ -324,6 +326,8 @@
             self.remoteTriggered = remote_type
             self.edit_song_form.loadSong(song_id, (remote_type == u'P'))
             self.edit_song_form.exec_()
+            self.auto_select_id = -1
+            self.onSongListLoad()
 
     def onEditClick(self):
         """
@@ -335,6 +339,8 @@
             item_id = (self.editItem.data(QtCore.Qt.UserRole)).toInt()[0]
             self.edit_song_form.loadSong(item_id, False)
             self.edit_song_form.exec_()
+            self.auto_select_id = -1
+            self.onSongListLoad()
         self.editItem = None
 
     def onDeleteClick(self):

_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to     : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to