This commit is contained in:
Tim Bentley 2010-06-25 17:50:35 +01:00
parent 8a83cb6e25
commit 7c873ada58

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):
""" """