diff options
author | Florent Pigout <florent.pigout@gmail.com> | 2011-09-22 00:07:10 (GMT) |
---|---|---|
committer | Florent Pigout <florent.pigout@gmail.com> | 2011-09-22 00:07:10 (GMT) |
commit | 8c14cc8fc665823e6c14ddccdcfcfe2f46916721 (patch) | |
tree | f6c9351eee9ff1c2a1f90f6a838453a78fe3ed2e /atoidejouer/ui/toolbar.py | |
parent | a44222e5f0bbf4ecfba1bc97fef67d7bc31771b5 (diff) |
ensure current sequence focus when creating or removing one then item add becomes implicit
Diffstat (limited to 'atoidejouer/ui/toolbar.py')
-rw-r--r-- | atoidejouer/ui/toolbar.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/atoidejouer/ui/toolbar.py b/atoidejouer/ui/toolbar.py index 1d0aa72..140565a 100644 --- a/atoidejouer/ui/toolbar.py +++ b/atoidejouer/ui/toolbar.py @@ -90,6 +90,8 @@ def _cb_seq_remove(widget, toolbar): toolbar._sequence_entry.set_text("") # update notebook _screen.notebook._get_store_sequence() + # update focus + _screen.notebook.focus_current_seq() # nothing to do else: pass @@ -97,6 +99,13 @@ def _cb_seq_remove(widget, toolbar): def _cb_seq_save(widget, toolbar, remove=False): storage.sequence_save(toolbar, remove=remove) + # get screen + _screen = toolbar.activity.get_current_screen() + # get sequence name + _name = toolbar._sequence_entry.get_text() + # update focus + _screen.notebook.focus_current_seq(name=_name) + def _show_browser(toolbar, cls): |