The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Stop processing menu items after a matching item is found in key bindings

These changes was commited to the Birdfont repository Sun, 29 Mar 2015 13:26:55 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 29 Mar 2015 13:26:55 +0000 (15:26 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 29 Mar 2015 13:26:55 +0000 (15:26 +0200)
commit b3cabc70ba1c0f9bfa949e11d5b19f3d8cf76352
tree c3b6835fcc208191cc36f51bb3856f6340804cfb
parent cf01d13d83dd2275d2e761b755b810dbcd475dc2
Stop processing menu items after a matching item is found in key bindings

libbirdfont/Menu.vala
--- a/libbirdfont/Menu.vala +++ b/libbirdfont/Menu.vala @@ -467,12 +467,13 @@ string display; FontDisplay current_display = MainWindow.get_current_display (); ToolItem tm; - + foreach (MenuItem item in sorted_menu_items) { if (item.key == (unichar) keyval && item.modifiers == KeyBindings.modifier) { if (current_display is Glyph && item.in_display ("Glyph")) { item.action (); + return; } display = current_display.get_name (); @@ -486,6 +487,7 @@ && item.in_display (display) && !(item is ToolItem)) { item.action (); + return; } if (item is ToolItem) { @@ -497,7 +499,7 @@ tm.tool.select_action (tm.tool); return; } else { - tm.tool.select_action (tm.tool); + tm.tool.select_action (tm.tool); return; } }