attempt to prevent calling updatePreview more than once

This commit is contained in:
Andreas Preikschat 2011-10-04 20:01:13 +02:00
parent ba3a2372dc
commit 1967951061
2 changed files with 5 additions and 5 deletions

View File

@ -328,8 +328,8 @@ class SlideController(QtGui.QWidget):
if self.isLive: if self.isLive:
QtCore.QObject.connect(self.volumeSlider, QtCore.QObject.connect(self.volumeSlider,
QtCore.SIGNAL(u'sliderReleased()'), self.mediaVolume) QtCore.SIGNAL(u'sliderReleased()'), self.mediaVolume)
QtCore.QObject.connect(Receiver.get_receiver(), # QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'maindisplay_active'), self.updatePreview) # QtCore.SIGNAL(u'maindisplay_active'), self.updatePreview)
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'slidecontroller_live_spin_delay'), QtCore.SIGNAL(u'slidecontroller_live_spin_delay'),
self.receiveSpinDelay) self.receiveSpinDelay)
@ -893,7 +893,6 @@ class SlideController(QtGui.QWidget):
Receiver.send_message( Receiver.send_message(
u'%s_slide' % self.serviceItem.name.lower(), u'%s_slide' % self.serviceItem.name.lower(),
[self.serviceItem, self.isLive, row]) [self.serviceItem, self.isLive, row])
self.updatePreview()
else: else:
toDisplay = self.serviceItem.get_rendered_frame(row) toDisplay = self.serviceItem.get_rendered_frame(row)
if self.serviceItem.is_text(): if self.serviceItem.is_text():
@ -926,6 +925,7 @@ class SlideController(QtGui.QWidget):
using *Blank to Theme*. using *Blank to Theme*.
""" """
log.debug(u'updatePreview %s ' % self.screens.current[u'primary']) log.debug(u'updatePreview %s ' % self.screens.current[u'primary'])
print u'updatePreview'
if not self.screens.current[u'primary'] and self.serviceItem and \ if not self.screens.current[u'primary'] and self.serviceItem and \
self.serviceItem.is_capable(ItemCapabilities.ProvidesOwnDisplay): self.serviceItem.is_capable(ItemCapabilities.ProvidesOwnDisplay):
# Grab now, but try again in a couple of seconds if slide change # Grab now, but try again in a couple of seconds if slide change

View File

@ -1,4 +1,4 @@
# -*- coding: utf-8 -*- #!/bin/sh
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 # vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
############################################################################### ###############################################################################