mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 12:45:45 +01:00
Ctrl+shift functionality (toggle all) for plugin leds.
The Fader led has special behavior and is only toggled when clicked explicitly.
This commit is contained in:
parent
784adc53bb
commit
83b5bdbe95
4 changed files with 44 additions and 8 deletions
|
|
@ -275,13 +275,39 @@ ProcessorEntry::set_enum_width (Width w)
|
|||
}
|
||||
|
||||
void
|
||||
ProcessorEntry::led_clicked()
|
||||
ProcessorEntry::led_clicked(GdkEventButton *ev)
|
||||
{
|
||||
bool ctrl_shift_pressed = false;
|
||||
Keyboard::ModifierMask ctrl_shift_mask = Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier);
|
||||
|
||||
if (Keyboard::modifier_state_equals (ev->state, ctrl_shift_mask)) {
|
||||
ctrl_shift_pressed = true;
|
||||
}
|
||||
|
||||
if (_processor) {
|
||||
if (_button.get_active ()) {
|
||||
_processor->deactivate ();
|
||||
if (ctrl_shift_pressed) {
|
||||
_parent->all_visible_processors_active(false);
|
||||
|
||||
if (_position == Fader) {
|
||||
_processor->deactivate ();
|
||||
}
|
||||
}
|
||||
else {
|
||||
_processor->deactivate ();
|
||||
}
|
||||
|
||||
} else {
|
||||
_processor->activate ();
|
||||
if (ctrl_shift_pressed) {
|
||||
_parent->all_visible_processors_active(true);
|
||||
|
||||
if (_position == Fader) {
|
||||
_processor->activate ();
|
||||
}
|
||||
}
|
||||
else {
|
||||
_processor->activate ();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -533,7 +559,7 @@ ProcessorEntry::Control::Control (boost::shared_ptr<AutomationControl> c, string
|
|||
_button.show ();
|
||||
|
||||
_button.signal_clicked.connect (sigc::mem_fun (*this, &Control::button_clicked));
|
||||
_button.signal_led_clicked.connect (sigc::mem_fun (*this, &Control::button_clicked));
|
||||
_button.signal_led_clicked.connect (sigc::mem_fun (*this, &Control::button_clicked_event));
|
||||
// dup. currently timers are used :(
|
||||
//c->Changed.connect (_connection, MISSING_INVALIDATOR, boost::bind (&Control::control_changed, this), gui_context ());
|
||||
|
||||
|
|
@ -644,6 +670,14 @@ ProcessorEntry::Control::button_clicked ()
|
|||
set_tooltip ();
|
||||
}
|
||||
|
||||
void
|
||||
ProcessorEntry::Control::button_clicked_event (GdkEventButton *ev)
|
||||
{
|
||||
(void) ev;
|
||||
|
||||
button_clicked ();
|
||||
}
|
||||
|
||||
void
|
||||
ProcessorEntry::Control::control_changed ()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue