mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Make hide/show all crossfades apply to the selection.
git-svn-id: svn://localhost/ardour2/branches/3.0@8939 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
8b1203dc33
commit
ed93d47e7c
3 changed files with 29 additions and 14 deletions
|
|
@ -181,8 +181,8 @@ AudioTimeAxisView::append_extra_display_menu_items ()
|
||||||
|
|
||||||
// crossfade stuff
|
// crossfade stuff
|
||||||
if (!Profile->get_sae() && is_track ()) {
|
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 (_("Hide All Crossfades"), sigc::bind (sigc::mem_fun(*this, &AudioTimeAxisView::hide_all_xfades), true)));
|
||||||
items.push_back (MenuElem (_("Show All Crossfades"), sigc::mem_fun(*this, &AudioTimeAxisView::show_all_xfades)));
|
items.push_back (MenuElem (_("Show All Crossfades"), sigc::bind (sigc::mem_fun(*this, &AudioTimeAxisView::show_all_xfades), true)));
|
||||||
items.push_back (SeparatorElem ());
|
items.push_back (SeparatorElem ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -346,22 +346,28 @@ AudioTimeAxisView::hide_all_automation ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioTimeAxisView::show_all_xfades ()
|
AudioTimeAxisView::show_all_xfades (bool apply_to_selection)
|
||||||
{
|
{
|
||||||
AudioStreamView* asv = audio_view();
|
if (apply_to_selection) {
|
||||||
|
_editor.get_selection().tracks.foreach_audio_time_axis (boost::bind (&AudioTimeAxisView::show_all_xfades, _1, false));
|
||||||
if (asv) {
|
} else {
|
||||||
asv->show_all_xfades ();
|
AudioStreamView* asv = audio_view ();
|
||||||
|
if (asv) {
|
||||||
|
asv->show_all_xfades ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioTimeAxisView::hide_all_xfades ()
|
AudioTimeAxisView::hide_all_xfades (bool apply_to_selection)
|
||||||
{
|
{
|
||||||
AudioStreamView* asv = audio_view();
|
if (apply_to_selection) {
|
||||||
|
_editor.get_selection().tracks.foreach_audio_time_axis (boost::bind (&AudioTimeAxisView::hide_all_xfades, _1, false));
|
||||||
if (asv) {
|
} else {
|
||||||
asv->hide_all_xfades ();
|
AudioStreamView* asv = audio_view ();
|
||||||
|
if (asv) {
|
||||||
|
asv->hide_all_xfades ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,8 @@ class AudioTimeAxisView : public RouteTimeAxisView
|
||||||
AudioStreamView* audio_view();
|
AudioStreamView* audio_view();
|
||||||
|
|
||||||
void set_show_waveforms_recording (bool yn);
|
void set_show_waveforms_recording (bool yn);
|
||||||
void show_all_xfades ();
|
void show_all_xfades (bool apply_to_selection = false);
|
||||||
void hide_all_xfades ();
|
void hide_all_xfades (bool apply_to_selection = false);
|
||||||
void hide_dependent_views (TimeAxisViewItem&);
|
void hide_dependent_views (TimeAxisViewItem&);
|
||||||
void reveal_dependent_views (TimeAxisViewItem&);
|
void reveal_dependent_views (TimeAxisViewItem&);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include "track_view_list.h"
|
#include "track_view_list.h"
|
||||||
#include "route_ui.h"
|
#include "route_ui.h"
|
||||||
|
#include "audio_time_axis.h"
|
||||||
|
|
||||||
class PublicEditor;
|
class PublicEditor;
|
||||||
|
|
||||||
|
|
@ -49,6 +50,14 @@ public:
|
||||||
f (t);
|
f (t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename Function>
|
||||||
|
void foreach_audio_time_axis (Function f) {
|
||||||
|
for (iterator i = begin(); i != end(); ++i) {
|
||||||
|
AudioTimeAxisView* t = dynamic_cast<AudioTimeAxisView*> (*i);
|
||||||
|
f (t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PublicEditor const * _editor;
|
PublicEditor const * _editor;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue