diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-04-11 14:06:50 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-04-11 14:06:50 +0000 |
commit | cb413146428ce5db5e281d70f2b3b7df27c1aaab (patch) | |
tree | 4961e9dcb107f2ca1f0a4298faf5135ba8611d92 /gtk2_ardour/time_axis_view.cc | |
parent | 9aa8af5a28abbb86c9ae86c6991838eb6828d0a9 (diff) |
merge 3.0 from 2.0-ongoing@3243
git-svn-id: svn://localhost/ardour2/branches/3.0@3248 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 e5205069a3..3259ac8a28 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -544,20 +544,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; } |