Mercurial > getan
changeset 179:3374ff7e7388
Bind project edit key to the actual ProjectEditKeyState
If the project edit key is pressed in the PausedProjectState switch to the
ProjectEditKeyState.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Thu, 13 Dec 2012 09:38:29 +0100 (2012-12-13) |
parents | 3f1ffb879ee8 |
children | c043eaf163b6 |
files | getan/states.py |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/getan/states.py Thu Dec 13 09:35:44 2012 +0100 +++ b/getan/states.py Thu Dec 13 09:38:29 2012 +0100 @@ -90,6 +90,12 @@ if keys.get_escape() in key: return ExitState(self.controller, self.view) + if keys.get_project_edit() in key: + proj = self.view.item_in_focus() + if not proj: + return self + return ProjectEditKeyState(self.controller, self.view, proj) + else: if len(key) > 0 and len(key[0]) == 1: select_proj = SelectProjectState(self.controller, self.view)