try to make impress support going before start

This commit is contained in:
Tomas Groth 2019-05-20 22:35:48 +02:00
parent 1d71cb83ba
commit 89ecdf2a96
2 changed files with 9 additions and 5 deletions

View File

@ -493,9 +493,13 @@ class ImpressDocument(PresentationDocument):
"""
Triggers the previous slide on the running presentation.
"""
# if we are at the presentations start don't go further back, just return True
if self.slide_ended_reverse and self.get_slide_number() == 1:
return True
self.slide_ended = False
self.slide_ended_reverse = False
self.control.gotoPreviousEffect()
return False
def get_slide_text(self, slide_no):
"""

View File

@ -191,18 +191,18 @@ class Controller(object):
"""
log.debug('Live = {live}, previous'.format(live=self.is_live))
if not self.doc:
return
return False
if not self.is_live:
return
return False
if self.hide_mode:
if not self.doc.is_active():
return
return False
if self.doc.slidenumber > 1:
self.doc.slidenumber -= 1
self.poll()
return
return False
if not self.activate():
return
return False
ret = self.doc.previous_step()
self.poll()
print('previous returning: %d' % ret)