changeset 215:a16c2c42d998

Use node_in_focus to get item_in_focus Avoid duplicate code
author Björn Ricks <bjoern.ricks@intevation.de>
date Fri, 05 Apr 2013 19:58:21 +0200
parents 6d5c8e205872
children bcaddd0319de
files getan/view.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/getan/view.py	Fri Apr 05 19:57:21 2013 +0200
+++ b/getan/view.py	Fri Apr 05 19:58:21 2013 +0200
@@ -74,8 +74,9 @@
         return len(self.rows)
 
     def item_in_focus(self):
-        if self.rows:
-            return self.rows[self.focused].get_item()
+        node = self.node_in_focus()
+        if node:
+            return node.get_item()
         return None
 
     def node_in_focus(self):
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)