aboutsummaryrefslogtreecommitdiffstats
path: root/mobility
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2011-03-01 17:43:42 -0300
committerLauro Neto <lauro.neto@openbossa.org>2011-03-01 17:45:01 -0300
commit090bc233f009b533a7e2d9a3d63ace38dfbd7b4c (patch)
tree6321c24a6d7e80ea9093e0f5788508a5430e6cda /mobility
parentb4310498d80e66f12fe5f259c6652dd87d02b19e (diff)
Fix delete items
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Reviewer: Willer Moreira <willer.moreira@openbossa.org>
Diffstat (limited to 'mobility')
-rw-r--r--mobility/organizer/todoeditor.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mobility/organizer/todoeditor.py b/mobility/organizer/todoeditor.py
index 869e2a5..7888edb 100644
--- a/mobility/organizer/todoeditor.py
+++ b/mobility/organizer/todoeditor.py
@@ -250,8 +250,8 @@ class Window(QWidget):
def deleteTodo(self):
items = self.listWidget.selectedItems()
- if len(items) > 0:
- item = items.at(0).data(Qt.UserRole)
+ if items:
+ item = items[0].data(Qt.UserRole)
if isinstance(item, QOrganizerTodo):
theTodo = item
self.manager.removeItem(theTodo.id())