13
0

push2: tweak logic of master button

This commit is contained in:
Paul Davis 2016-09-27 14:30:43 -05:00
parent 303358973f
commit db4edbf3b5

View File

@ -727,18 +727,23 @@ Push2::button_mix_press ()
void
Push2::button_master ()
{
boost::shared_ptr<Stripable> master = session->master_out();
boost::shared_ptr<Stripable> main_out = session->master_out ();
if (!master) {
if (!main_out) {
return;
}
ControlProtocol::SetStripableSelection (master);
if (_current_layout != track_mix_layout) {
ControlProtocol::SetStripableSelection (main_out);
set_current_layout (track_mix_layout);
} else {
set_current_layout (_previous_layout);
TrackMixLayout* tml = dynamic_cast<TrackMixLayout*> (_current_layout);
if (tml->current_stripable() == main_out) {
/* back to previous layout */
set_current_layout (_previous_layout);
} else {
ControlProtocol::SetStripableSelection (main_out);
}
}
}