The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – 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
[Sun, 29 Mar 2015 13:26:55 +0000]

Updated Files

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; } }