openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #09675
[Merge] lp:~smpettit/openlp/bug-789102 into lp:openlp
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/63173
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.
Move loadlist code out of initialise() and changed repeated calls to initialise to -> onSearchTextButtonClick. This now conforms to code in "songs"
--
https://code.launchpad.net/~smpettit/openlp/bug-789102/+merge/63173
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-06-01 21:21:07 +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-06-01 21:21:07 +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-06-01 21:21:07 +0000
@@ -109,7 +109,7 @@
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'custom_edit_clear'), self.onRemoteEditClear)
QtCore.QObject.connect(Receiver.get_receiver(),
- QtCore.SIGNAL(u'custom_load_list'), self.initialise)
+ QtCore.SIGNAL(u'custom_load_list'), self.loadList)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'custom_preview'), self.onPreviewClick)
@@ -129,14 +129,6 @@
self.searchTextEdit.setCurrentSearchType(QtCore.QSettings().value(
u'%s/last search type' % self.settingsSection,
QtCore.QVariant(CustomSearch.Titles)).toInt()[0])
- # Called to redisplay the custom list screen edith from a search
- # or from the exit of the Custom edit dialog. If remote editing is
- # active trigger it and clean up so it will not update again.
- if self.remoteTriggered == u'L':
- self.onAddClick()
- if self.remoteTriggered == u'P':
- self.onPreviewClick()
- self.onRemoteEditClear()
def loadList(self, custom_slides):
# Sort out what custom we want to select after loading the list.
@@ -155,11 +147,20 @@
if custom_slide.id == self.auto_select_id:
self.listView.setCurrentItem(custom_name)
self.auto_select_id = -1
+ # Called to redisplay the custom list screen edith from a search
+ # or from the exit of the Custom edit dialog. If remote editing is
+ # active trigger it and clean up so it will not update again.
+ if self.remoteTriggered == u'L':
+ self.onAddClick()
+ if self.remoteTriggered == u'P':
+ self.onPreviewClick()
+ self.onRemoteEditClear()
def onNewClick(self):
self.edit_custom_form.loadCustom(0)
self.edit_custom_form.exec_()
- self.initialise()
+ self.onClearTextButtonClick()
+ 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.onSearchTextButtonClick()
def onEditClick(self):
"""
@@ -189,7 +192,8 @@
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
self.edit_custom_form.loadCustom(item_id, False)
self.edit_custom_form.exec_()
- self.initialise()
+ self.auto_select_id = -1
+ self.onSearchTextButtonClick()
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-06-01 21:21:07 +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-06-01 21:21:07 +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):
Follow ups