Speed up edit by not calling render until there is a match

This commit is contained in:
Tim Bentley 2011-06-11 18:17:13 +01:00
commit 26419d8f18

View File

@ -1077,10 +1077,10 @@ class ServiceManager(QtGui.QWidget):
Using the service item passed replace the one with the same edit id Using the service item passed replace the one with the same edit id
if found. if found.
""" """
newItem.render()
for itemcount, item in enumerate(self.serviceItems): for itemcount, item in enumerate(self.serviceItems):
if item[u'service_item'].edit_id == newItem.edit_id and \ if item[u'service_item'].edit_id == newItem.edit_id and \
item[u'service_item'].name == newItem.name: item[u'service_item'].name == newItem.name:
newItem.render()
newItem.merge(item[u'service_item']) newItem.merge(item[u'service_item'])
item[u'service_item'] = newItem item[u'service_item'] = newItem
self.repaintServiceList(itemcount + 1, 0) self.repaintServiceList(itemcount + 1, 0)