Fixed bug #818791 ("Reorder Service Item" does not manage two instances of the same image)

bzr-revno: 1703
Fixes: https://launchpad.net/bugs/818791
This commit is contained in:
Stevan Pettit 2011-08-06 16:06:28 +02:00 committed by Andreas Preikschat
commit 392c103476

View File

@ -79,7 +79,7 @@ class ServiceItemEditForm(QtGui.QDialog, Ui_ServiceItemEditDialog):
if not item: if not item:
return return
row = self.listWidget.row(item) row = self.listWidget.row(item)
self.itemList.remove(self.itemList[row]) self.itemList.pop(row)
self.loadData() self.loadData()
if row == self.listWidget.count(): if row == self.listWidget.count():
self.listWidget.setCurrentRow(row - 1) self.listWidget.setCurrentRow(row - 1)
@ -109,7 +109,7 @@ class ServiceItemEditForm(QtGui.QDialog, Ui_ServiceItemEditDialog):
return return
row = self.listWidget.row(item) row = self.listWidget.row(item)
temp = self.itemList[row] temp = self.itemList[row]
self.itemList.remove(self.itemList[row]) self.itemList.pop(row)
if direction == u'up': if direction == u'up':
row -= 1 row -= 1
else: else: