plugin-sidebar: select on right-click (before context-menu)
authorRobin Gareus <robin@gareus.org>
Mon, 28 Dec 2015 16:03:40 +0000 (17:03 +0100)
committerRobin Gareus <robin@gareus.org>
Mon, 28 Dec 2015 16:23:45 +0000 (17:23 +0100)
gtk2_ardour/mixer_ui.cc

index 51659b55e192dffa7aae78925372e57a6aab0b19..d4c37c84f800a7fabe17e6f8a76997ca27a6e439 100644 (file)
@@ -2371,6 +2371,16 @@ bool
 Mixer_UI::plugin_row_button_press (GdkEventButton *ev)
 {
        if ((ev->type == GDK_BUTTON_PRESS) && (ev->button == 3) ) {
+               TreeModel::Path path;
+               TreeViewColumn* column;
+               int cellx, celly;
+               if (favorite_plugins_display.get_path_at_pos ((int)ev->x, (int)ev->y, path, column, cellx, celly)) {
+                       Glib::RefPtr<Gtk::TreeView::Selection> selection = favorite_plugins_display.get_selection();
+                       if (selection) {
+                               selection->unselect_all();
+                               selection->select(path);
+                       }
+               }
                popup_note_context_menu (ev);
        }
        return false;