diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-03-24 19:49:21 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-03-24 19:49:21 +0000 |
commit | c8616fde7e43a956bf6ce43a14a4cec1eb3cd985 (patch) | |
tree | 3c4a388c60ee670d89243c4aa55d49f61b5d00bd /gtk2_ardour/time_axis_view.cc | |
parent | 7e14351aee59c83d71b4b1d137138a1e5874632b (diff) |
small change to logic for track selection when context/button clicking on a track header.
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3177 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_axis_view.cc')
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 207402a7cb..01f81c0f09 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -528,20 +528,32 @@ TimeAxisView::name_entry_button_release (GdkEventButton *ev) } void +TimeAxisView::conditionally_add_to_selection () +{ + Selection& s (editor.get_selection()); + + if (!s.selected (this)) { + cerr << "set selected track\n"; + editor.set_selected_track (*this, Selection::Set); + } +} + + +void TimeAxisView::popup_display_menu (guint32 when) { if (display_menu == 0) { build_display_menu (); } - editor.set_selected_track (*this, Selection::Add); + conditionally_add_to_selection (); display_menu->popup (1, when); } gint TimeAxisView::size_click (GdkEventButton *ev) { - editor.set_selected_track (*this, Selection::Add); + conditionally_add_to_selection (); popup_size_menu (ev->time); return TRUE; } |