// 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 ());
}
}
}
void
-AudioTimeAxisView::show_all_automation ()
+AudioTimeAxisView::show_all_automation (bool apply_to_selection)
{
- no_redraw = true;
-
- RouteTimeAxisView::show_all_automation ();
-
- no_redraw = false;
-
- _route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
+ if (apply_to_selection) {
+ _editor.get_selection().tracks.foreach_audio_time_axis (boost::bind (&AudioTimeAxisView::show_all_automation, _1, false));
+ } else {
+
+ no_redraw = true;
+
+ RouteTimeAxisView::show_all_automation ();
+
+ no_redraw = false;
+
+ _route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
+ }
}
void
-AudioTimeAxisView::show_existing_automation ()
+AudioTimeAxisView::show_existing_automation (bool apply_to_selection)
{
- no_redraw = true;
-
- RouteTimeAxisView::show_existing_automation ();
-
- no_redraw = false;
-
- _route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
+ if (apply_to_selection) {
+ _editor.get_selection().tracks.foreach_audio_time_axis (boost::bind (&AudioTimeAxisView::show_existing_automation, _1, false));
+ } else {
+ no_redraw = true;
+
+ RouteTimeAxisView::show_existing_automation ();
+
+ no_redraw = false;
+
+ _route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
+ }
}
void
-AudioTimeAxisView::hide_all_automation ()
+AudioTimeAxisView::hide_all_automation (bool apply_to_selection)
{
- no_redraw = true;
-
- RouteTimeAxisView::hide_all_automation();
-
- no_redraw = false;
- _route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
+ if (apply_to_selection) {
+ _editor.get_selection().tracks.foreach_audio_time_axis (boost::bind (&AudioTimeAxisView::hide_all_automation, _1, false));
+ } else {
+ no_redraw = true;
+
+ RouteTimeAxisView::hide_all_automation();
+
+ no_redraw = false;
+ _route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
+ }
}
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 ();
+ }
}
}
void
AudioTimeAxisView::route_active_changed ()
{
- RouteTimeAxisView::route_active_changed ();
update_control_names ();
}
}
void
-AudioTimeAxisView::build_automation_action_menu ()
+AudioTimeAxisView::build_automation_action_menu (bool for_selection)
{
using namespace Menu_Helpers;
- RouteTimeAxisView::build_automation_action_menu ();
+ RouteTimeAxisView::build_automation_action_menu (for_selection);
MenuList& automation_items = automation_action_menu->items ();
automation_items.push_back (CheckMenuElem (_("Fader"), sigc::mem_fun (*this, &AudioTimeAxisView::update_gain_track_visibility)));
gain_automation_item = dynamic_cast<CheckMenuItem*> (&automation_items.back ());
- gain_automation_item->set_active (gain_track->marked_for_display ());
+ gain_automation_item->set_active (gain_track->marked_for_display () && (!for_selection || _editor.get_selection().tracks.size() == 1));
_main_automation_menu_map[Evoral::Parameter(GainAutomation)] = gain_automation_item;
automation_items.push_back (CheckMenuElem (_("Pan"), sigc::mem_fun (*this, &AudioTimeAxisView::update_pan_track_visibility)));
pan_automation_item = dynamic_cast<CheckMenuItem*> (&automation_items.back ());
- pan_automation_item->set_active (pan_tracks.front()->marked_for_display ());
+ pan_automation_item->set_active (pan_tracks.front()->marked_for_display () && (!for_selection || _editor.get_selection().tracks.size() == 1));
set<Evoral::Parameter> const & params = _route->pannable()->what_can_be_automated ();
for (set<Evoral::Parameter>::iterator p = params.begin(); p != params.end(); ++p) {
RouteTimeAxisView::add_processor_to_subplugin_menu (wp);
}
}
+
+void
+AudioTimeAxisView::enter_internal_edit_mode ()
+{
+ if (audio_view()) {
+ audio_view()->enter_internal_edit_mode ();
+ }
+}
+
+void
+AudioTimeAxisView::leave_internal_edit_mode ()
+{
+ if (audio_view()) {
+ audio_view()->leave_internal_edit_mode ();
+ }
+}