Stop delete of last Image

bzr-revno: 884
This commit is contained in:
Tim Bentley 2010-06-25 19:26:55 +01:00
commit 45a09351f8

View File

@ -73,6 +73,10 @@ class ServiceItemEditForm(QtGui.QDialog, Ui_ServiceItemEditDialog):
for frame in self.itemList: for frame in self.itemList:
item_name = QtGui.QListWidgetItem(frame[u'title']) item_name = QtGui.QListWidgetItem(frame[u'title'])
self.listWidget.addItem(item_name) self.listWidget.addItem(item_name)
if self.listWidget.count() == 1:
self.deleteButton.setEnabled(False)
else:
self.deleteButton.setEnabled(True)
def onItemDelete(self): def onItemDelete(self):
""" """