LCXL: some more small tweaks
[ardour.git] / libs / surfaces / launch_control_xl / controllers.cc
index 94021fa48127b82a3e23efe432148d3bc512afa8..ee9ca7719bbe093913b9bfaf577bc7c3cb6eac73 100644 (file)
@@ -345,23 +345,23 @@ LaunchControlXL::build_maps ()
                boost::bind (&LaunchControlXL::button_device_long_press, this));
 
 
-       if (!device_mode()) {   /* mixer mode */
-               MAKE_SELECT_BUTTON_PRESS(SelectLeft, 106, 46, boost::bind (&LaunchControlXL::button_select_left, this));
-               MAKE_SELECT_BUTTON_PRESS(SelectRight, 107, 47, boost::bind (&LaunchControlXL::button_select_right, this));
-
-               //MAKE_TRACK_STATE_BUTTON_PRESS(Mute, 106, 41, boost::bind (&LaunchControlXL::button_mute, this));
+       /* Cancel all mute / solo is available in both modes */
 
-               MAKE_TRACK_STATE_BUTTON_PRESS_RELEASE_LONG(Mute, 106, 41,
+       MAKE_TRACK_STATE_BUTTON_PRESS_RELEASE_LONG(Mute, 106, 41,
                        boost::bind (&LaunchControlXL::relax, this) ,
                        boost::bind (&LaunchControlXL::button_mute, this),
                boost::bind (&LaunchControlXL::button_mute_long_press, this));
 
-               MAKE_TRACK_STATE_BUTTON_PRESS_RELEASE_LONG(Solo, 107, 42,
+       MAKE_TRACK_STATE_BUTTON_PRESS_RELEASE_LONG(Solo, 107, 42,
                        boost::bind (&LaunchControlXL::relax, this) ,
                        boost::bind (&LaunchControlXL::button_solo, this),
                boost::bind (&LaunchControlXL::button_solo_long_press, this));
 
-               //MAKE_TRACK_STATE_BUTTON_PRESS(Solo, 107, 42, boost::bind (&LaunchControlXL::button_solo, this));
+
+       if (!device_mode()) {   /* mixer mode */
+               MAKE_SELECT_BUTTON_PRESS(SelectLeft, 106, 46, boost::bind (&LaunchControlXL::button_select_left, this));
+               MAKE_SELECT_BUTTON_PRESS(SelectRight, 107, 47, boost::bind (&LaunchControlXL::button_select_right, this));
+
                MAKE_TRACK_STATE_BUTTON_PRESS(Record, 108, 43, boost::bind (&LaunchControlXL::button_record, this));
 
        } else {        /* device mode */
@@ -1096,6 +1096,10 @@ LaunchControlXL::dm_check_dummy (DeviceStatus ds)
 void
 LaunchControlXL::dm_fader (FaderID id) {
 
+       if (!first_selected_stripable()) {
+               return;
+       }
+
        boost::shared_ptr<AutomationControl> ac;
        boost::shared_ptr<Fader> fader;