forked from openlp/openlp
Fix error if go next off end of powerpoint
This commit is contained in:
parent
a0319d127c
commit
f5e619584a
@ -95,6 +95,8 @@ class Controller(object):
|
||||
if self.is_live:
|
||||
self.doc.start_presentation()
|
||||
if self.doc.slidenumber > 1:
|
||||
if self.doc.slidenumber > self.doc.get_slide_count():
|
||||
self.doc.slidenumber = self.doc.get_slide_count()
|
||||
self.doc.goto_slide(self.doc.slidenumber)
|
||||
|
||||
def slide(self, slide):
|
||||
@ -150,6 +152,11 @@ class Controller(object):
|
||||
if self.doc.slidenumber < self.doc.get_slide_count():
|
||||
self.doc.slidenumber = self.doc.slidenumber + 1
|
||||
return
|
||||
# The "End of slideshow" screen is after the last slide
|
||||
# Note, we can't just stop on the last slide, since it may
|
||||
# contain animations that need to be stepped through.
|
||||
if self.doc.slidenumber > self.doc.get_slide_count():
|
||||
return
|
||||
self.activate()
|
||||
self.doc.next_step()
|
||||
self.doc.poll_slidenumber(self.is_live)
|
||||
|
Loading…
Reference in New Issue
Block a user