start tweaks to make Shift sticky; remove Shift-press combobox from gui since we don't allow that to be bound (next-marker)
This commit is contained in:
parent
37961a6bbe
commit
cb965cba16
@ -308,18 +308,20 @@ FaderPort::button_handler (MIDI::Parser &, MIDI::EventTwoBytes* tb)
|
|||||||
button.timeout_connection.disconnect ();
|
button.timeout_connection.disconnect ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ButtonState bs (ButtonState (0));
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case Shift:
|
case Shift:
|
||||||
button_state = (tb->value ? ButtonState (button_state|ShiftDown) : ButtonState (button_state&~ShiftDown));
|
bs = ShiftDown;
|
||||||
break;
|
break;
|
||||||
case Stop:
|
case Stop:
|
||||||
button_state = (tb->value ? ButtonState (button_state|StopDown) : ButtonState (button_state&~StopDown));
|
bs = StopDown;
|
||||||
break;
|
break;
|
||||||
case Rewind:
|
case Rewind:
|
||||||
button_state = (tb->value ? ButtonState (button_state|RewindDown) : ButtonState (button_state&~RewindDown));
|
bs = RewindDown;
|
||||||
break;
|
break;
|
||||||
case User:
|
case User:
|
||||||
button_state = (tb->value ? ButtonState (button_state|UserDown) : ButtonState (button_state&~UserDown));
|
bs = UserDown;
|
||||||
break;
|
break;
|
||||||
case FaderTouch:
|
case FaderTouch:
|
||||||
fader_is_touched = tb->value;
|
fader_is_touched = tb->value;
|
||||||
@ -342,6 +344,10 @@ FaderPort::button_handler (MIDI::Parser &, MIDI::EventTwoBytes* tb)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bs) {
|
||||||
|
button_state = (tb->value ? ButtonState (button_state|bs) : ButtonState (button_state&~bs));
|
||||||
|
}
|
||||||
|
|
||||||
if (button.uses_flash()) {
|
if (button.uses_flash()) {
|
||||||
button.set_led_state (_output_port, (int)tb->value);
|
button.set_led_state (_output_port, (int)tb->value);
|
||||||
}
|
}
|
||||||
|
@ -138,9 +138,12 @@ FPGUI::FPGUI (FaderPort& p)
|
|||||||
|
|
||||||
build_available_action_menu ();
|
build_available_action_menu ();
|
||||||
|
|
||||||
|
/* No shift-press combo for User because that is labelled as "next"
|
||||||
|
* (marker)
|
||||||
|
*/
|
||||||
|
|
||||||
build_user_action_combo (user_combo[0], FaderPort::ButtonState(0));
|
build_user_action_combo (user_combo[0], FaderPort::ButtonState(0));
|
||||||
build_user_action_combo (user_combo[1], FaderPort::ShiftDown);
|
build_user_action_combo (user_combo[1], FaderPort::LongPress);
|
||||||
build_user_action_combo (user_combo[2], FaderPort::LongPress);
|
|
||||||
|
|
||||||
action_table.set_row_spacings (4);
|
action_table.set_row_spacings (4);
|
||||||
action_table.set_col_spacings (6);
|
action_table.set_col_spacings (6);
|
||||||
@ -225,13 +228,10 @@ FPGUI::FPGUI (FaderPort& p)
|
|||||||
align->set (0.0, 0.5);
|
align->set (0.0, 0.5);
|
||||||
align->add (user_combo[0]);
|
align->add (user_combo[0]);
|
||||||
action_table.attach (*align, 1, 2, action_row, action_row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
|
action_table.attach (*align, 1, 2, action_row, action_row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
|
||||||
|
/* skip shift press combo */
|
||||||
align = manage (new Alignment);
|
align = manage (new Alignment);
|
||||||
align->set (0.0, 0.5);
|
align->set (0.0, 0.5);
|
||||||
align->add (user_combo[1]);
|
align->add (user_combo[1]);
|
||||||
action_table.attach (*align, 2, 3, action_row, action_row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
|
|
||||||
align = manage (new Alignment);
|
|
||||||
align->set (0.0, 0.5);
|
|
||||||
align->add (user_combo[2]);
|
|
||||||
action_table.attach (*align, 3, 4, action_row, action_row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
|
action_table.attach (*align, 3, 4, action_row, action_row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
|
||||||
action_row++;
|
action_row++;
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ private:
|
|||||||
Gtk::ComboBox mix_combo[3];
|
Gtk::ComboBox mix_combo[3];
|
||||||
Gtk::ComboBox proj_combo[3];
|
Gtk::ComboBox proj_combo[3];
|
||||||
Gtk::ComboBox trns_combo[3];
|
Gtk::ComboBox trns_combo[3];
|
||||||
Gtk::ComboBox user_combo[3];
|
Gtk::ComboBox user_combo[2];
|
||||||
|
|
||||||
void update_port_combos ();
|
void update_port_combos ();
|
||||||
PBD::ScopedConnection connection_change_connection;
|
PBD::ScopedConnection connection_change_connection;
|
||||||
|
Loading…
Reference in New Issue
Block a user