forked from openlp/openlp
Fix traceback when going live with presentation while blanked to desktop
This commit is contained in:
parent
3f145078f5
commit
2bc78ffd25
@ -243,6 +243,10 @@ class Controller(object):
|
|||||||
Instruct the controller to stop and hide the presentation.
|
Instruct the controller to stop and hide the presentation.
|
||||||
"""
|
"""
|
||||||
log.debug('Live = %s, stop' % self.is_live)
|
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.
|
# Save the current slide number to be able to return to this slide if the presentation is activated again.
|
||||||
if self.doc.is_active():
|
if self.doc.is_active():
|
||||||
self.doc.slidenumber = self.doc.get_slide_number()
|
self.doc.slidenumber = self.doc.get_slide_number()
|
||||||
|
@ -330,6 +330,7 @@ class PowerpointDocument(PresentationDocument):
|
|||||||
"""
|
"""
|
||||||
log.debug('start_presentation')
|
log.debug('start_presentation')
|
||||||
# SlideShowWindow measures its size/position by points, not pixels
|
# SlideShowWindow measures its size/position by points, not pixels
|
||||||
|
# https://technet.microsoft.com/en-us/library/dn528846.aspx
|
||||||
try:
|
try:
|
||||||
dpi = win32ui.GetActiveWindow().GetDC().GetDeviceCaps(88)
|
dpi = win32ui.GetActiveWindow().GetDC().GetDeviceCaps(88)
|
||||||
except win32ui.error:
|
except win32ui.error:
|
||||||
|
@ -128,7 +128,8 @@ class PresentationTab(SettingsTab):
|
|||||||
'Clicking on a selected slide in the slidecontroller advances to next effect.'))
|
'Clicking on a selected slide in the slidecontroller advances to next effect.'))
|
||||||
self.ppt_window_check_box.setText(
|
self.ppt_window_check_box.setText(
|
||||||
translate('PresentationPlugin.PresentationTab',
|
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(
|
self.pdf_program_check_box.setText(
|
||||||
translate('PresentationPlugin.PresentationTab', 'Use given full path for mudraw or ghostscript binary:'))
|
translate('PresentationPlugin.PresentationTab', 'Use given full path for mudraw or ghostscript binary:'))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user