13
0

faderport: fix SNAFU caused by switching to Mixbus-style use of user button

User stopped being a modifier but was still being treated as one.
This commit is contained in:
Paul Davis 2024-07-23 18:20:51 -06:00
parent c2329c4708
commit 3f8d0ddc3d
3 changed files with 3 additions and 12 deletions

View File

@ -321,13 +321,8 @@ FaderPort::handle_midi_pitchbend_message (MIDI::Parser &, MIDI::pitchbend_t pb)
ButtonState trim_modifier; ButtonState trim_modifier;
ButtonState width_modifier; ButtonState width_modifier;
if (Profile->get_mixbus()) { trim_modifier = ShiftDown;
trim_modifier = ShiftDown; width_modifier = ButtonState (0);
width_modifier = ButtonState (0);
} else {
trim_modifier = UserDown;
width_modifier = ShiftDown;
}
if ((button_state & trim_modifier) == trim_modifier ) { // mod+encoder = input trim if ((button_state & trim_modifier) == trim_modifier ) { // mod+encoder = input trim
std::shared_ptr<AutomationControl> trim = _current_stripable->trim_control (); std::shared_ptr<AutomationControl> trim = _current_stripable->trim_control ();

View File

@ -131,7 +131,7 @@ class FaderPort : public MIDISurface {
ShiftDown = 0x1, ShiftDown = 0x1,
RewindDown = 0x2, RewindDown = 0x2,
StopDown = 0x4, StopDown = 0x4,
UserDown = 0x8, /* gap when we removed UserMode as a modifier */
LongPress = 0x10 LongPress = 0x10
}; };

View File

@ -436,10 +436,6 @@ FPGUI::build_foot_action_combo (Gtk::ComboBox& cb, FaderPort::ButtonState bs)
void void
FPGUI::build_user_action_combo (Gtk::ComboBox& cb, FaderPort::ButtonState bs) FPGUI::build_user_action_combo (Gtk::ComboBox& cb, FaderPort::ButtonState bs)
{ {
#ifndef MIXBUS
bs = FaderPort::ButtonState (bs|FaderPort::UserDown);
#endif
/* set the active "row" to the right value for the current button binding */ /* set the active "row" to the right value for the current button binding */
string current_action = fp.get_action (FaderPort::User, false, bs); /* lookup release action */ string current_action = fp.get_action (FaderPort::User, false, bs); /* lookup release action */