bzr-revno: 1455
Fixes: https://launchpad.net/bugs/754484
This commit is contained in:
Andreas Preikschat 2011-04-11 20:16:35 +02:00
commit f24a8f1365
2 changed files with 11 additions and 10 deletions

View File

@ -692,9 +692,9 @@ class ServiceManager(QtGui.QWidget):
Called by the SlideController to request a preview item be made live Called by the SlideController to request a preview item be made live
and allows the next preview to be updated if relevent. and allows the next preview to be updated if relevent.
""" """
id, row = message.split(u':') uuid, row = message.split(u':')
for sitem in self.serviceItems: for sitem in self.serviceItems:
if sitem[u'service_item']._uuid == id: if sitem[u'service_item']._uuid == uuid:
item = self.serviceManagerList.topLevelItem(sitem[u'order'] - 1) item = self.serviceManagerList.topLevelItem(sitem[u'order'] - 1)
self.serviceManagerList.setCurrentItem(item) self.serviceManagerList.setCurrentItem(item)
self.makeLive(int(row)) self.makeLive(int(row))
@ -1022,7 +1022,7 @@ class ServiceManager(QtGui.QWidget):
editId, uuid = message.split(u':') editId, uuid = message.split(u':')
for item in self.serviceItems: for item in self.serviceItems:
if item[u'service_item']._uuid == uuid: if item[u'service_item']._uuid == uuid:
item[u'service_item'].edit_id = editId item[u'service_item'].edit_id = int(editId)
self.setModified(True) self.setModified(True)
def replaceServiceItem(self, newItem): def replaceServiceItem(self, newItem):

View File

@ -283,19 +283,20 @@ class SongMediaItem(MediaManagerItem):
self.remoteTriggered = None self.remoteTriggered = None
self.remoteSong = -1 self.remoteSong = -1
def onRemoteEdit(self, songid): def onRemoteEdit(self, message):
""" """
Called by ServiceManager or SlideController by event passing Called by ServiceManager or SlideController by event passing
the Song Id in the payload along with an indicator to say which the Song Id in the payload along with an indicator to say which
type of display is required. type of display is required.
""" """
log.debug(u'onRemoteEdit %s' % songid) log.debug(u'onRemoteEdit %s' % message)
fields = songid.split(u':') remote_type, song_id = message.split(u':')
valid = self.parent.manager.get_object(Song, fields[1]) song_id = int(song_id)
valid = self.parent.manager.get_object(Song, song_id)
if valid: if valid:
self.remoteSong = fields[1] self.remoteSong = song_id
self.remoteTriggered = fields[0] self.remoteTriggered = remote_type
self.edit_song_form.loadSong(fields[1], (fields[0] == u'P')) self.edit_song_form.loadSong(song_id, (remote_type == u'P'))
self.edit_song_form.exec_() self.edit_song_form.exec_()
def onEditClick(self): def onEditClick(self):