13
0

add correct implementation for cancel all solo to BasicUI

This commit is contained in:
Paul Davis 2016-06-16 23:31:11 -04:00
parent d407d09d9c
commit 40dd604dbc
2 changed files with 50 additions and 2 deletions

View File

@ -24,6 +24,7 @@
#include "ardour/session.h"
#include "ardour/location.h"
#include "ardour/tempo.h"
#include "ardour/utils.h"
#include "control_protocol/basic_ui.h"
@ -495,6 +496,51 @@ BasicUI::sample_to_timecode (framepos_t sample, Timecode::Time& timecode, bool u
session->sample_to_timecode (sample, *((Timecode::Time*)&timecode), use_offset, use_subframes);
}
void
BasicUI::toggle_selection (PresentationInfo::order_t o, PresentationInfo::Flag flags)
{
boost::shared_ptr<Stripable> s = session->get_remote_nth_stripable (o, flags);
if (s) {
s->presentation_info().set_selected (!s->presentation_info().selected());
}
}
void
BasicUI::clear_stripable_selection ()
{
session->clear_stripable_selection ();
}
void
BasicUI::toggle_stripable_selection (boost::shared_ptr<Stripable> s)
{
session->toggle_stripable_selection (s);
}
void
BasicUI::add_stripable_selection (boost::shared_ptr<Stripable> s)
{
session->add_stripable_selection (s);
}
void
BasicUI::set_stripable_selection (boost::shared_ptr<Stripable> s)
{
session->set_stripable_selection (s);
}
void
BasicUI::cancel_all_solo ()
{
if (session) {
StripableList sl;
session->get_stripables (sl);
session->set_controls (stripable_list_to_control_list (sl, &Stripable::solo_control), 0.0, PBD::Controllable::NoGroup);
}
}
#if 0
this stuff is waiting to go in so that all UIs can offer complex solo/mute functionality

View File

@ -83,7 +83,7 @@ class LIBCONTROLCP_API BasicUI {
void redo ();
void toggle_punch_in ();
void toggle_punch_out ();
void mark_in();
void mark_out();
@ -94,6 +94,8 @@ class LIBCONTROLCP_API BasicUI {
void toggle_monitor_dim();
void toggle_monitor_mono();
void cancel_all_solo ();
void quick_snapshot_stay ();
void quick_snapshot_switch ();
@ -108,7 +110,7 @@ class LIBCONTROLCP_API BasicUI {
void set_record_enable (bool yn);
bool get_record_enabled ();
//editor visibility stuff (why do we have to make explicit numbers here? because "gui actions" don't accept args
//editor visibility stuff (why do we have to make explicit numbers here? because "gui actions" don't accept args
void fit_1_track();
void fit_2_tracks();
void fit_4_tracks();