From b6b9f248af46263276e15d52f854261b9e4576ad Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Tue, 19 Nov 2013 22:04:51 +0000 Subject: [PATCH] Fixed bug1222534 ny using userData rather than relying on a translated string --- openlp/plugins/presentations/lib/mediaitem.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openlp/plugins/presentations/lib/mediaitem.py b/openlp/plugins/presentations/lib/mediaitem.py index 2f944810f..3becefbe4 100644 --- a/openlp/plugins/presentations/lib/mediaitem.py +++ b/openlp/plugins/presentations/lib/mediaitem.py @@ -153,7 +153,7 @@ class PresentationMediaItem(MediaManagerItem): if self.controllers[item].enabled(): self.displayTypeComboBox.addItem(item) if self.displayTypeComboBox.count() > 1: - self.displayTypeComboBox.insertItem(0, self.Automatic) + self.displayTypeComboBox.insertItem(0, self.Automatic, userData=u'automatic') self.displayTypeComboBox.setCurrentIndex(0) if Settings().value(self.settingsSection + u'/override app', QtCore.QVariant(QtCore.Qt.Unchecked)) == QtCore.Qt.Checked: @@ -277,13 +277,13 @@ class PresentationMediaItem(MediaManagerItem): service_item.shortname = unicode(self.displayTypeComboBox.currentText()) service_item.add_capability(ItemCapabilities.ProvidesOwnDisplay) service_item.add_capability(ItemCapabilities.HasDetailedTitleDisplay) - shortname = service_item.shortname - if not shortname: + if not service_item.shortname: return False for bitem in items: filename = unicode(bitem.data(QtCore.Qt.UserRole).toString()) if os.path.exists(filename): - if shortname == self.Automatic: + if self.displayTypeComboBox.itemData( + self.displayTypeComboBox.currentIndex()) == u'automatic': service_item.shortname = self.findControllerByType(filename) if not service_item.shortname: return False