- mark a service as modified when item notes have been changed

bzr-revno: 1485
This commit is contained in:
Andreas Preikschat 2011-04-25 11:54:33 +02:00
commit dd655f84b1

View File

@ -686,6 +686,7 @@ class ServiceManager(QtGui.QWidget):
self.serviceItems[item][u'service_item'].notes = \ self.serviceItems[item][u'service_item'].notes = \
self.serviceNoteForm.textEdit.toPlainText() self.serviceNoteForm.textEdit.toPlainText()
self.repaintServiceList(item, -1) self.repaintServiceList(item, -1)
self.setModified()
def onStartTimeForm(self): def onStartTimeForm(self):
item = self.findServiceItem()[0] item = self.findServiceItem()[0]
@ -789,7 +790,7 @@ class ServiceManager(QtGui.QWidget):
# Top Item was selected so set the last one # Top Item was selected so set the last one
if setLastItem: if setLastItem:
lastItem.setSelected(True) lastItem.setSelected(True)
self.setModified(True) self.setModified()
def onMoveSelectionDown(self): def onMoveSelectionDown(self):
""" """
@ -811,7 +812,7 @@ class ServiceManager(QtGui.QWidget):
serviceIterator += 1 serviceIterator += 1
if setSelected: if setSelected:
firstItem.setSelected(True) firstItem.setSelected(True)
self.setModified(True) self.setModified()
def onCollapseAll(self): def onCollapseAll(self):
""" """
@ -855,7 +856,7 @@ class ServiceManager(QtGui.QWidget):
self.serviceItems.remove(self.serviceItems[item]) self.serviceItems.remove(self.serviceItems[item])
self.serviceItems.insert(0, temp) self.serviceItems.insert(0, temp)
self.repaintServiceList(0, child) self.repaintServiceList(0, child)
self.setModified(True) self.setModified()
def onServiceUp(self): def onServiceUp(self):
""" """
@ -867,7 +868,7 @@ class ServiceManager(QtGui.QWidget):
self.serviceItems.remove(self.serviceItems[item]) self.serviceItems.remove(self.serviceItems[item])
self.serviceItems.insert(item - 1, temp) self.serviceItems.insert(item - 1, temp)
self.repaintServiceList(item - 1, child) self.repaintServiceList(item - 1, child)
self.setModified(True) self.setModified()
def onServiceDown(self): def onServiceDown(self):
""" """
@ -879,7 +880,7 @@ class ServiceManager(QtGui.QWidget):
self.serviceItems.remove(self.serviceItems[item]) self.serviceItems.remove(self.serviceItems[item])
self.serviceItems.insert(item + 1, temp) self.serviceItems.insert(item + 1, temp)
self.repaintServiceList(item + 1, child) self.repaintServiceList(item + 1, child)
self.setModified(True) self.setModified()
def onServiceEnd(self): def onServiceEnd(self):
""" """
@ -891,7 +892,7 @@ class ServiceManager(QtGui.QWidget):
self.serviceItems.remove(self.serviceItems[item]) self.serviceItems.remove(self.serviceItems[item])
self.serviceItems.insert(len(self.serviceItems), temp) self.serviceItems.insert(len(self.serviceItems), temp)
self.repaintServiceList(len(self.serviceItems) - 1, child) self.repaintServiceList(len(self.serviceItems) - 1, child)
self.setModified(True) self.setModified()
def onDeleteFromService(self): def onDeleteFromService(self):
""" """
@ -901,7 +902,7 @@ class ServiceManager(QtGui.QWidget):
if item != -1: if item != -1:
self.serviceItems.remove(self.serviceItems[item]) self.serviceItems.remove(self.serviceItems[item])
self.repaintServiceList(item - 1, -1) self.repaintServiceList(item - 1, -1)
self.setModified(True) self.setModified()
def repaintServiceList(self, serviceItem, serviceItemChild): def repaintServiceList(self, serviceItem, serviceItemChild):
""" """
@ -1026,7 +1027,7 @@ class ServiceManager(QtGui.QWidget):
item[u'service_item'], False, expand=item[u'expanded']) item[u'service_item'], False, expand=item[u'expanded'])
# Set to False as items may have changed rendering # Set to False as items may have changed rendering
# does not impact the saved song so True may also be valid # does not impact the saved song so True may also be valid
self.setModified(True) self.setModified()
Receiver.send_message(u'cursor_normal') Receiver.send_message(u'cursor_normal')
def serviceItemUpdate(self, message): def serviceItemUpdate(self, message):
@ -1037,7 +1038,7 @@ class ServiceManager(QtGui.QWidget):
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 = int(editId) item[u'service_item'].edit_id = int(editId)
self.setModified(True) self.setModified()
def replaceServiceItem(self, newItem): def replaceServiceItem(self, newItem):
""" """
@ -1053,7 +1054,7 @@ class ServiceManager(QtGui.QWidget):
self.repaintServiceList(itemcount + 1, 0) self.repaintServiceList(itemcount + 1, 0)
self.mainwindow.liveController.replaceServiceManagerItem( self.mainwindow.liveController.replaceServiceManagerItem(
newItem) newItem)
self.setModified(True) self.setModified()
def addServiceItem(self, item, rebuild=False, expand=None, replace=False): def addServiceItem(self, item, rebuild=False, expand=None, replace=False):
""" """
@ -1098,7 +1099,7 @@ class ServiceManager(QtGui.QWidget):
if rebuild: if rebuild:
self.mainwindow.liveController.replaceServiceManagerItem(item) self.mainwindow.liveController.replaceServiceManagerItem(item)
self.dropPosition = 0 self.dropPosition = 0
self.setModified(True) self.setModified()
def makePreview(self): def makePreview(self):
""" """
@ -1235,7 +1236,7 @@ class ServiceManager(QtGui.QWidget):
self.serviceItems.remove(serviceItem) self.serviceItems.remove(serviceItem)
self.serviceItems.insert(endpos, serviceItem) self.serviceItems.insert(endpos, serviceItem)
self.repaintServiceList(endpos, child) self.repaintServiceList(endpos, child)
self.setModified(True) self.setModified()
else: else:
# we are not over anything so drop # we are not over anything so drop
replace = False replace = False