summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/surfaces/push2/buttons.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/libs/surfaces/push2/buttons.cc b/libs/surfaces/push2/buttons.cc
index 572bb875ad..43e4255f01 100644
--- a/libs/surfaces/push2/buttons.cc
+++ b/libs/surfaces/push2/buttons.cc
@@ -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);
+ }
}
}