diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-07-10 13:02:42 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-27 14:59:31 -0500 |
commit | a4324d79a7278d0fb89db3f266b1cdfe6e2ee14b (patch) | |
tree | 279f273f494aecf49764c104869b0fb5d70a89fb /libs/surfaces/push2/buttons.cc | |
parent | 995f3f80bbe963437d0b6365e1a6dee032a454b9 (diff) |
push2: add a little meat to the bones of the TrackMix layout (just a name, for now)
Diffstat (limited to 'libs/surfaces/push2/buttons.cc')
-rw-r--r-- | libs/surfaces/push2/buttons.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libs/surfaces/push2/buttons.cc b/libs/surfaces/push2/buttons.cc index 19fbfcb513..c33ef8807f 100644 --- a/libs/surfaces/push2/buttons.cc +++ b/libs/surfaces/push2/buttons.cc @@ -25,6 +25,7 @@ #include "layout.h" #include "push2.h" +#include "track_mix.h" using namespace ArdourSurface; using namespace ARDOUR; @@ -176,7 +177,7 @@ Push2::build_maps () MAKE_WHITE_BUTTON (Delete, 118); MAKE_WHITE_BUTTON (AddDevice, 52); MAKE_WHITE_BUTTON (Device, 110); - MAKE_WHITE_BUTTON (Mix, 112); + MAKE_WHITE_BUTTON_PRESS (Mix, 112, &Push2::button_mix_press); MAKE_WHITE_BUTTON_PRESS (Undo, 119, &Push2::button_undo); MAKE_WHITE_BUTTON_PRESS (AddTrack, 53, &Push2::button_add_track); MAKE_WHITE_BUTTON_PRESS (Browse, 111, &Push2::button_browse); @@ -547,3 +548,16 @@ Push2::button_scale_press () _current_layout = mix_layout; } } + +void +Push2::button_mix_press () +{ + if (_current_layout == track_mix_layout) { + _current_layout = mix_layout; + } else { + if (ControlProtocol::first_selected_stripable()) { + dynamic_cast<TrackMixLayout*> (track_mix_layout)->set_stripable (ControlProtocol::first_selected_stripable()); + _current_layout = track_mix_layout; + } + } +} |