mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
Fix double toggle on repeat call of on_button_release_event
This can happen with touch screens.. leading to `set_active (!get_active ());` being called twice, and effective NOOP.
This commit is contained in:
parent
d0a5bff06e
commit
5a90eb0776
1 changed files with 4 additions and 2 deletions
|
|
@ -1082,10 +1082,10 @@ ArdourButton::on_button_release_event (GdkEventButton *ev)
|
|||
return true;
|
||||
}
|
||||
|
||||
_grabbed = false;
|
||||
CairoWidget::set_dirty ();
|
||||
|
||||
if (ev->button == 1 && _hovering) {
|
||||
if (ev->button == 1 && _hovering && _grabbed) {
|
||||
_grabbed = false;
|
||||
if (_act_on_release && _auto_toggle && !_action) {
|
||||
set_active (!get_active ());
|
||||
}
|
||||
|
|
@ -1098,6 +1098,8 @@ ArdourButton::on_button_release_event (GdkEventButton *ev)
|
|||
}
|
||||
}
|
||||
|
||||
_grabbed = false;
|
||||
|
||||
return _fallthrough_to_parent ? false : true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue