openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #04829
[Merge] lp:~trb143/openlp/bugs into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/bugs into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
#690335 The slides of a customs item cannot be reduced to one
https://bugs.launchpad.net/bugs/690335
Fix Custom edit bug 690335
--
https://code.launchpad.net/~trb143/openlp/bugs/+merge/43698
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bugs into lp:openlp.
=== modified file 'openlp/plugins/custom/forms/editcustomform.py'
--- openlp/plugins/custom/forms/editcustomform.py 2010-11-29 07:32:08 +0000
+++ openlp/plugins/custom/forms/editcustomform.py 2010-12-14 20:26:13 +0000
@@ -224,27 +224,24 @@
``edit_all``
Indicates if all slides or only one slide has been edited.
"""
- if len(slides) == 1:
- self.slideListView.currentItem().setText(slides[0])
+ if edit_all:
+ self.slideListView.clear()
+ for slide in slides:
+ self.slideListView.addItem(slide)
else:
- if edit_all:
- self.slideListView.clear()
- for slide in slides:
- self.slideListView.addItem(slide)
- else:
- old_slides = []
- old_row = self.slideListView.currentRow()
- # Create a list with all (old/unedited) slides.
- old_slides = [self.slideListView.item(row).text() for row in \
- range(0, self.slideListView.count())]
- self.slideListView.clear()
- old_slides.pop(old_row)
- # Insert all slides to make the old_slides list complete.
- for slide in slides:
- old_slides.insert(old_row, slide)
- for slide in old_slides:
- self.slideListView.addItem(slide)
- self.slideListView.repaint()
+ old_slides = []
+ old_row = self.slideListView.currentRow()
+ # Create a list with all (old/unedited) slides.
+ old_slides = [self.slideListView.item(row).text() for row in \
+ range(0, self.slideListView.count())]
+ self.slideListView.clear()
+ old_slides.pop(old_row)
+ # Insert all slides to make the old_slides list complete.
+ for slide in slides:
+ old_slides.insert(old_row, slide)
+ for slide in old_slides:
+ self.slideListView.addItem(slide)
+ self.slideListView.repaint()
def onDeleteButtonPressed(self):
self.slideListView.takeItem(self.slideListView.currentRow())
Follow ups