diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-06-16 23:31:11 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-27 14:59:29 -0500 |
commit | 40dd604dbc460ce65794c79d6b67bfa71eddf5a8 (patch) | |
tree | 9d1ae94ed9a63bda521b55dfed15dccfada5bb00 /libs/surfaces/control_protocol | |
parent | d407d09d9cc15fbb576997191075d7b2393fdefe (diff) |
add correct implementation for cancel all solo to BasicUI
Diffstat (limited to 'libs/surfaces/control_protocol')
-rw-r--r-- | libs/surfaces/control_protocol/basic_ui.cc | 46 | ||||
-rw-r--r-- | libs/surfaces/control_protocol/control_protocol/basic_ui.h | 6 |
2 files changed, 50 insertions, 2 deletions
diff --git a/libs/surfaces/control_protocol/basic_ui.cc b/libs/surfaces/control_protocol/basic_ui.cc index 74c2802a7a..6ec3fb0003 100644 --- a/libs/surfaces/control_protocol/basic_ui.cc +++ b/libs/surfaces/control_protocol/basic_ui.cc @@ -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 diff --git a/libs/surfaces/control_protocol/control_protocol/basic_ui.h b/libs/surfaces/control_protocol/control_protocol/basic_ui.h index 43ebcfa9e7..a09c28e627 100644 --- a/libs/surfaces/control_protocol/control_protocol/basic_ui.h +++ b/libs/surfaces/control_protocol/control_protocol/basic_ui.h @@ -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(); |