Fix blanking

This commit is contained in:
Tomas Groth 2015-04-28 22:24:01 +01:00
parent 9c0525b00c
commit 472baeb079
2 changed files with 2 additions and 14 deletions

View File

@ -243,6 +243,8 @@ class Controller(object):
Instruct the controller to stop and hide the presentation.
"""
log.debug('Live = %s, stop' % self.is_live)
# Save the current slide number to be able to return to this slide if the presentation is activated again.
self.doc.slidenumber = self.doc.get_slide_number()
self.hide_mode = HideMode.Screen
if not self.doc:
return
@ -266,8 +268,6 @@ class Controller(object):
return
if not self.activate():
return
if self.doc.slidenumber and self.doc.slidenumber != self.doc.get_slide_number():
self.doc.goto_slide(self.doc.slidenumber)
self.doc.unblank_screen()
Registry().execute('live_display_hide', HideMode.Screen)

View File

@ -121,8 +121,6 @@ class PowerpointDocument(PresentationDocument):
self.presentation = None
self.index_map = {}
self.slide_count = 0
self.blank_slide = None
self.blank_click = None
def load_presentation(self):
"""
@ -231,13 +229,6 @@ class PowerpointDocument(PresentationDocument):
# ppSlideShowRunning = 1
self.presentation.SlideShowWindow.View.State = 1
self.presentation.SlideShowWindow.Activate()
# Unblanking is broken it seems, can't return to the right slide
if self.blank_slide:
self.presentation.SlideShowWindow.View.GotoSlide(self.blank_slide, False)
if self.blank_click:
self.presentation.SlideShowWindow.View.GotoClick(self.blank_click)
self.blank_slide = None
self.blank_click = None
except (AttributeError, pywintypes.com_error) as e:
log.exception('Caught exception while in unblank_screen')
log.exception(e)
@ -252,9 +243,6 @@ class PowerpointDocument(PresentationDocument):
"""
log.debug('blank_screen')
try:
# Unblanking is broken it seems, can't return to the right slide, need to save info for later
self.blank_slide = self.get_slide_number()
self.blank_click = self.presentation.SlideShowWindow.View.GetClickIndex()
# ppSlideShowBlackScreen = 3
self.presentation.SlideShowWindow.View.State = 3
except (AttributeError, pywintypes.com_error) as e: