forked from openlp/openlp
Fixed the order of components which need to update their screen information
This commit is contained in:
parent
25a697e03e
commit
cd8e96b6a3
@ -79,13 +79,14 @@ class ImageManager(QtCore.QObject):
|
||||
self._cache_dirty = False
|
||||
self.image_thread = ImageThread(self)
|
||||
|
||||
def update_display(self, width, height):
|
||||
def update_display(self):
|
||||
"""
|
||||
Screen has changed size so rebuild the cache to new size
|
||||
"""
|
||||
log.debug(u'update_display')
|
||||
self.width = width
|
||||
self.height = height
|
||||
current_screen = ScreenList.get_instance().current
|
||||
self.width = current_screen[u'size'].width()
|
||||
self.height = current_screen[u'size'].height()
|
||||
# mark the images as dirty for a rebuild
|
||||
for key in self._cache.keys():
|
||||
image = self._cache[key]
|
||||
|
@ -85,7 +85,6 @@ class Renderer(object):
|
||||
self.display.setup()
|
||||
self.bg_frame = None
|
||||
self.theme_data = None
|
||||
self.image_manager.update_display(self.width, self.height)
|
||||
|
||||
def set_global_theme(self, global_theme, theme_level=ThemeLevel.Global):
|
||||
"""
|
||||
|
@ -777,7 +777,10 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
their locations
|
||||
"""
|
||||
log.debug(u'screenChanged')
|
||||
self.image_manager.update_display()
|
||||
self.renderer.update_display()
|
||||
self.liveController.screenSizeChanged()
|
||||
self.previewController.screenSizeChanged()
|
||||
self.setFocus()
|
||||
self.activateWindow()
|
||||
|
||||
|
@ -366,8 +366,6 @@ class SlideController(QtGui.QWidget):
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_%s_text_request' % self.typePrefix),
|
||||
self.onTextRequest)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'config_screen_changed'), self.screenSizeChanged)
|
||||
|
||||
def setPreviewHotkeys(self, parent=None):
|
||||
self.previousItem.setObjectName(u'previousItemPreview')
|
||||
|
Loading…
Reference in New Issue
Block a user