Fixed bug #791050 by hiding and then showing the toolbar.

bzr-revno: 1657
This commit is contained in:
Raoul Snyman 2011-06-24 14:25:31 +02:00
commit e6cab2ce84

View File

@ -500,7 +500,9 @@ class SlideController(QtGui.QWidget):
""" """
Allows the live toolbar to be customised Allows the live toolbar to be customised
""" """
self.toolbar.setVisible(True) # Work-around for OS X, hide and then show the toolbar
# See bug #791050
self.toolbar.hide()
self.mediabar.setVisible(False) self.mediabar.setVisible(False)
self.toolbar.makeWidgetsInvisible([u'Song Menu']) self.toolbar.makeWidgetsInvisible([u'Song Menu'])
self.toolbar.makeWidgetsInvisible(self.loopList) self.toolbar.makeWidgetsInvisible(self.loopList)
@ -515,12 +517,18 @@ class SlideController(QtGui.QWidget):
if item.is_media(): if item.is_media():
self.toolbar.setVisible(False) self.toolbar.setVisible(False)
self.mediabar.setVisible(True) self.mediabar.setVisible(True)
else:
# Work-around for OS X, hide and then show the toolbar
# See bug #791050
self.toolbar.show()
def enablePreviewToolBar(self, item): def enablePreviewToolBar(self, item):
""" """
Allows the Preview toolbar to be customised Allows the Preview toolbar to be customised
""" """
self.toolbar.setVisible(True) # Work-around for OS X, hide and then show the toolbar
# See bug #791050
self.toolbar.hide()
self.mediabar.setVisible(False) self.mediabar.setVisible(False)
self.toolbar.makeWidgetsInvisible(self.songEditList) self.toolbar.makeWidgetsInvisible(self.songEditList)
if item.is_capable(ItemCapabilities.AllowsEdit) and item.from_plugin: if item.is_capable(ItemCapabilities.AllowsEdit) and item.from_plugin:
@ -529,6 +537,10 @@ class SlideController(QtGui.QWidget):
self.toolbar.setVisible(False) self.toolbar.setVisible(False)
self.mediabar.setVisible(True) self.mediabar.setVisible(True)
self.volumeSlider.setAudioOutput(self.audio) self.volumeSlider.setAudioOutput(self.audio)
if not item.is_media():
# Work-around for OS X, hide and then show the toolbar
# See bug #791050
self.toolbar.show()
def refreshServiceItem(self): def refreshServiceItem(self):
""" """