mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Also reset Vizia widgets on right click
Because why choose. Right click, Ctrl+click, and double click all do the same thing now.
This commit is contained in:
@@ -469,8 +469,8 @@ impl View for ParamSlider {
|
||||
self.text_input_active = true;
|
||||
cx.set_active(true);
|
||||
} else if cx.modifiers.command() {
|
||||
// Ctrl+Click and double click should reset the parameter instead of initiating
|
||||
// a drag operation
|
||||
// Ctrl+Click, double click, and right clicks should reset the parameter instead
|
||||
// of initiating a drag operation
|
||||
self.param_base.begin_set_parameter(cx);
|
||||
self.param_base
|
||||
.set_normalized_value(cx, self.param_base.default_normalized_value());
|
||||
@@ -501,9 +501,12 @@ impl View for ParamSlider {
|
||||
|
||||
meta.consume();
|
||||
}
|
||||
WindowEvent::MouseDoubleClick(MouseButton::Left) => {
|
||||
// Ctrl+Click and double click should reset the parameter instead of initiating
|
||||
// a drag operation
|
||||
WindowEvent::MouseDoubleClick(MouseButton::Left)
|
||||
| WindowEvent::MouseDown(MouseButton::Right)
|
||||
| WindowEvent::MouseDoubleClick(MouseButton::Right)
|
||||
| WindowEvent::MouseTripleClick(MouseButton::Right) => {
|
||||
// Ctrl+Click, double click, and right clicks should reset the parameter instead of
|
||||
// initiating a drag operation
|
||||
self.param_base.begin_set_parameter(cx);
|
||||
self.param_base
|
||||
.set_normalized_value(cx, self.param_base.default_normalized_value());
|
||||
|
||||
Reference in New Issue
Block a user