Fix traceback when going live with presentation while blanked to desktop

This commit is contained in:
Tomas Groth 2015-06-02 22:16:10 +01:00
parent 3f145078f5
commit 2bc78ffd25
3 changed files with 7 additions and 1 deletions

View File

@ -243,6 +243,10 @@ class Controller(object):
Instruct the controller to stop and hide the presentation.
"""
log.debug('Live = %s, stop' % self.is_live)
# The document has not been loaded yet, so don't do anything. This can happen when going live with a
# presentation while blanked to desktop.
if not self.doc:
return
# Save the current slide number to be able to return to this slide if the presentation is activated again.
if self.doc.is_active():
self.doc.slidenumber = self.doc.get_slide_number()

View File

@ -330,6 +330,7 @@ class PowerpointDocument(PresentationDocument):
"""
log.debug('start_presentation')
# SlideShowWindow measures its size/position by points, not pixels
# https://technet.microsoft.com/en-us/library/dn528846.aspx
try:
dpi = win32ui.GetActiveWindow().GetDC().GetDeviceCaps(88)
except win32ui.error:

View File

@ -128,7 +128,8 @@ class PresentationTab(SettingsTab):
'Clicking on a selected slide in the slidecontroller advances to next effect.'))
self.ppt_window_check_box.setText(
translate('PresentationPlugin.PresentationTab',
'Let PowerPoint control the size and position of the presentation window.'))
'Let PowerPoint control the size and position of the presentation window '
'(workaround for Windows 8 scaling issue).'))
self.pdf_program_check_box.setText(
translate('PresentationPlugin.PresentationTab', 'Use given full path for mudraw or ghostscript binary:'))