diff options
author | Carl Hetherington <carl@carlh.net> | 2011-02-23 02:08:46 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-02-23 02:08:46 +0000 |
commit | ed93d47e7cbf467161d89c84297e19c26039a6ff (patch) | |
tree | b2298feab9625611807a151773ca5366bebd7ada /gtk2_ardour/audio_time_axis.cc | |
parent | 8b1203dc335a9c7534ef484bd6842e48439c3652 (diff) |
Make hide/show all crossfades apply to the selection.
git-svn-id: svn://localhost/ardour2/branches/3.0@8939 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_time_axis.cc')
-rw-r--r-- | gtk2_ardour/audio_time_axis.cc | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index f43d3739cc..35033c3991 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -181,8 +181,8 @@ AudioTimeAxisView::append_extra_display_menu_items () // crossfade stuff if (!Profile->get_sae() && is_track ()) { - items.push_back (MenuElem (_("Hide All Crossfades"), sigc::mem_fun(*this, &AudioTimeAxisView::hide_all_xfades))); - items.push_back (MenuElem (_("Show All Crossfades"), sigc::mem_fun(*this, &AudioTimeAxisView::show_all_xfades))); + items.push_back (MenuElem (_("Hide All Crossfades"), sigc::bind (sigc::mem_fun(*this, &AudioTimeAxisView::hide_all_xfades), true))); + items.push_back (MenuElem (_("Show All Crossfades"), sigc::bind (sigc::mem_fun(*this, &AudioTimeAxisView::show_all_xfades), true))); items.push_back (SeparatorElem ()); } } @@ -346,22 +346,28 @@ AudioTimeAxisView::hide_all_automation () } void -AudioTimeAxisView::show_all_xfades () +AudioTimeAxisView::show_all_xfades (bool apply_to_selection) { - AudioStreamView* asv = audio_view(); - - if (asv) { - asv->show_all_xfades (); + if (apply_to_selection) { + _editor.get_selection().tracks.foreach_audio_time_axis (boost::bind (&AudioTimeAxisView::show_all_xfades, _1, false)); + } else { + AudioStreamView* asv = audio_view (); + if (asv) { + asv->show_all_xfades (); + } } } void -AudioTimeAxisView::hide_all_xfades () +AudioTimeAxisView::hide_all_xfades (bool apply_to_selection) { - AudioStreamView* asv = audio_view(); - - if (asv) { - asv->hide_all_xfades (); + if (apply_to_selection) { + _editor.get_selection().tracks.foreach_audio_time_axis (boost::bind (&AudioTimeAxisView::hide_all_xfades, _1, false)); + } else { + AudioStreamView* asv = audio_view (); + if (asv) { + asv->hide_all_xfades (); + } } } |