diff options
author | Robin Gareus <robin@gareus.org> | 2017-03-16 02:25:53 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-03-16 02:36:48 +0100 |
commit | 3aefd0e74495c327599c76a918caa1df11064b21 (patch) | |
tree | 2cb7fa51b61d55aa467fddc583fab92dd16da3c8 /gtk2_ardour/editor_routes.cc | |
parent | b3722f7063699fafd0421d504e05a7300c70e0ec (diff) |
consolidate context-menu popup methods
Diffstat (limited to 'gtk2_ardour/editor_routes.cc')
-rw-r--r-- | gtk2_ardour/editor_routes.cc | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/gtk2_ardour/editor_routes.cc b/gtk2_ardour/editor_routes.cc index 2ed98cfad5..0d08c6ea87 100644 --- a/gtk2_ardour/editor_routes.cc +++ b/gtk2_ardour/editor_routes.cc @@ -559,16 +559,6 @@ EditorRoutes::build_menu () } void -EditorRoutes::show_menu () -{ - if (_menu == 0) { - build_menu (); - } - - _menu->popup (1, gtk_get_current_event_time()); -} - -void EditorRoutes::redisplay_real () { TreeModel::Children rows = _model->children(); @@ -1472,7 +1462,10 @@ bool EditorRoutes::button_press (GdkEventButton* ev) { if (Keyboard::is_context_menu_event (ev)) { - show_menu (); + if (_menu == 0) { + build_menu (); + } + _menu->popup (ev->button, ev->time); return true; } |