X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fsurfaces%2Fpush2%2Fbuttons.cc;h=035d7b2e5f0eca16f0e4f2d1ccfd09fc066bf8f0;hb=f35c5fd5a6f7d0ad1c0be9727f5d4d0bf41db70d;hp=cc153c22d01a6a86dee1afbdaacb4f3b49abb05e;hpb=6f2ac5d6addd1562667c51bdda64ba471cc23d31;p=ardour.git diff --git a/libs/surfaces/push2/buttons.cc b/libs/surfaces/push2/buttons.cc index cc153c22d0..035d7b2e5f 100644 --- a/libs/surfaces/push2/buttons.cc +++ b/libs/surfaces/push2/buttons.cc @@ -141,7 +141,7 @@ Push2::build_maps () MAKE_COLOR_BUTTON_PRESS (Lower6, 25, &Push2::button_lower_6); MAKE_COLOR_BUTTON_PRESS (Lower7, 26, &Push2::button_lower_7); MAKE_COLOR_BUTTON_PRESS (Lower8, 27, &Push2::button_lower_8); - MAKE_COLOR_BUTTON (Master, 28); + MAKE_COLOR_BUTTON_PRESS (Master, 28, &Push2::button_master); MAKE_COLOR_BUTTON_PRESS (Mute, 60, &Push2::button_mute); MAKE_COLOR_BUTTON_PRESS_RELEASE_LONG (Solo, 61, &Push2::relax, &Push2::button_solo, &Push2::button_solo_long_press); MAKE_COLOR_BUTTON_PRESS (Stop, 29, &Push2::button_stop); @@ -583,6 +583,22 @@ Push2::button_mix_press () } } +void +Push2::button_master () +{ + boost::shared_ptr master = session->master_out(); + + if (!master) { + return; + } + + ControlProtocol::SetStripableSelection (master); + + if (_current_layout != track_mix_layout) { + set_current_layout (track_mix_layout); + } +} + std::string Push2::button_name_by_id (ButtonID id) {