Fixed the order of components which need to update their screen information

This commit is contained in:
Andreas Preikschat 2011-05-07 17:51:44 +02:00
parent 25a697e03e
commit cd8e96b6a3
4 changed files with 7 additions and 6 deletions

View File

@ -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]

View File

@ -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):
"""

View File

@ -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()

View File

@ -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')