openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #07546
[Merge] lp:~googol-hush/openlp/fixes into lp:openlp
Andreas Preikschat has proposed merging lp:~googol-hush/openlp/fixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #598393 in OpenLP: "After adding a new image to a selected (image) item in the service manager it is not selected anymore"
https://bugs.launchpad.net/openlp/+bug/598393
Bug #719102 in OpenLP: "editing author after editing song causes traceback"
https://bugs.launchpad.net/openlp/+bug/719102
Bug #730979 in OpenLP: "Song export crashes"
https://bugs.launchpad.net/openlp/+bug/730979
For more details, see:
https://code.launchpad.net/~googol-hush/openlp/fixes/+merge/55010
Hello,
- fix for http://support.openlp.org/issues/142
As there is not good description I could not fix the real cause, instead this fix. (Anyway, the person used 1.9.4 and who knows if that issue still exists?)
--
https://code.launchpad.net/~googol-hush/openlp/fixes/+merge/55010
Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/fixes into lp:openlp.
=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py 2011-03-25 17:49:53 +0000
+++ openlp/core/lib/serviceitem.py 2011-03-27 18:38:25 +0000
@@ -406,24 +406,28 @@
def get_rendered_frame(self, row):
"""
- Returns the correct frame for a given list and
- renders it if required.
+ Returns the correct frame for a given list and renders it if required.
"""
- if self.service_item_type == ServiceItemType.Text:
- return self._display_frames[row][u'html'].split(u'\n')[0]
- elif self.service_item_type == ServiceItemType.Image:
- return self._raw_frames[row][u'title']
- else:
- return self._raw_frames[row][u'image']
+ try:
+ if self.service_item_type == ServiceItemType.Text:
+ frame = self._display_frames[row][u'html'].split(u'\n')[0]
+ elif self.service_item_type == ServiceItemType.Image:
+ frame = self._raw_frames[row][u'title']
+ else:
+ frame = self._raw_frames[row][u'image']
+ except IndexError:
+ frame = u''
+ return frame
def get_frame_title(self, row=0):
"""
Returns the title of the raw frame
"""
try:
- return self._raw_frames[row][u'title']
+ title = self._raw_frames[row][u'title']
except IndexError:
- return u''
+ title = u''
+ return title
def get_frame_path(self, row=0):
"""
Follow ups