forked from openlp/openlp
Workaround for windows display not updating, webkit player does not work yet. Partial fix for bug 1531319.
Fixes: https://launchpad.net/bugs/1531319
This commit is contained in:
parent
6b23a2224f
commit
85c329fb26
@ -90,7 +90,7 @@ class Display(QtWidgets.QGraphicsView):
|
|||||||
# OpenGL. Only white blank screen is shown on the 2nd monitor all the
|
# OpenGL. Only white blank screen is shown on the 2nd monitor all the
|
||||||
# time. We need to investigate more how to use OpenGL properly on Mac OS
|
# time. We need to investigate more how to use OpenGL properly on Mac OS
|
||||||
# X.
|
# X.
|
||||||
if not is_macosx() and not is_win():
|
if not is_macosx():
|
||||||
self.setViewport(QtOpenGL.QGLWidget())
|
self.setViewport(QtOpenGL.QGLWidget())
|
||||||
|
|
||||||
def setup(self):
|
def setup(self):
|
||||||
@ -559,6 +559,13 @@ class MainDisplay(OpenLPMixin, Display, RegistryProperties):
|
|||||||
if window_id == main_window_id:
|
if window_id == main_window_id:
|
||||||
self.main_window.raise_()
|
self.main_window.raise_()
|
||||||
|
|
||||||
|
def shake_web_view(self):
|
||||||
|
"""
|
||||||
|
Resizes the web_view a bit to force an update. Workaround for bug #1531319, should not be needed with PyQt 5.6.
|
||||||
|
"""
|
||||||
|
self.web_view.setGeometry(0, 0, self.width(), self.height()-1)
|
||||||
|
self.web_view.setGeometry(0, 0, self.width(), self.height())
|
||||||
|
|
||||||
|
|
||||||
class AudioPlayer(OpenLPMixin, QtCore.QObject):
|
class AudioPlayer(OpenLPMixin, QtCore.QObject):
|
||||||
"""
|
"""
|
||||||
|
@ -31,7 +31,7 @@ from threading import Lock
|
|||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
from openlp.core.common import Registry, RegistryProperties, Settings, SlideLimits, UiStrings, translate, \
|
from openlp.core.common import Registry, RegistryProperties, Settings, SlideLimits, UiStrings, translate, \
|
||||||
RegistryMixin, OpenLPMixin
|
RegistryMixin, OpenLPMixin, is_win
|
||||||
from openlp.core.lib import OpenLPToolbar, ItemCapabilities, ServiceItem, ImageSource, ServiceItemAction, \
|
from openlp.core.lib import OpenLPToolbar, ItemCapabilities, ServiceItem, ImageSource, ServiceItemAction, \
|
||||||
ScreenList, build_icon, build_html
|
ScreenList, build_icon, build_html
|
||||||
from openlp.core.ui import HideMode, MainDisplay, Display, DisplayControllerType
|
from openlp.core.ui import HideMode, MainDisplay, Display, DisplayControllerType
|
||||||
@ -1101,6 +1101,9 @@ class SlideController(DisplayController, RegistryProperties):
|
|||||||
self.display.image(to_display)
|
self.display.image(to_display)
|
||||||
# reset the store used to display first image
|
# reset the store used to display first image
|
||||||
self.service_item.bg_image_bytes = None
|
self.service_item.bg_image_bytes = None
|
||||||
|
# Workaround for bug #1531319, should not be needed with PyQt 5.6.
|
||||||
|
if self.is_live and is_win():
|
||||||
|
self.display.shake_web_view()
|
||||||
self.selected_row = row
|
self.selected_row = row
|
||||||
self.update_preview()
|
self.update_preview()
|
||||||
self.preview_widget.change_slide(row)
|
self.preview_widget.change_slide(row)
|
||||||
|
Loading…
Reference in New Issue
Block a user