From f35c5fd5a6f7d0ad1c0be9727f5d4d0bf41db70d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 22 Sep 2016 14:41:49 -0500 Subject: push2: master button now does something useful --- libs/surfaces/push2/buttons.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'libs/surfaces/push2/buttons.cc') 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) { -- cgit v1.2.3