improvement in regard to bug #598415

This commit is contained in:
andreas 2010-06-25 20:18:52 +02:00
parent 72ef67512c
commit 1800ae4ddb

View File

@ -74,8 +74,12 @@ class ServiceItemEditForm(QtGui.QDialog, Ui_ServiceItemEditDialog):
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: if self.listWidget.count() == 1:
self.downButton.setEnabled(False)
self.upButton.setEnabled(False)
self.deleteButton.setEnabled(False) self.deleteButton.setEnabled(False)
else: else:
self.downButton.setEnabled(True)
self.upButton.setEnabled(True)
self.deleteButton.setEnabled(True) self.deleteButton.setEnabled(True)
def onItemDelete(self): def onItemDelete(self):