From 64da9c52c2f1f118eb70579847c7bb0b5c0cb941 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Wed, 9 Feb 2022 12:28:38 +0100 Subject: [PATCH] Add todo about modifier handling in egui-baseview --- nih_plug_egui/src/widgets/param_slider.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nih_plug_egui/src/widgets/param_slider.rs b/nih_plug_egui/src/widgets/param_slider.rs index 3abd09e7..93546358 100644 --- a/nih_plug_egui/src/widgets/param_slider.rs +++ b/nih_plug_egui/src/widgets/param_slider.rs @@ -58,6 +58,10 @@ impl<'a, P: Param> ParamSlider<'a, P> { .set_parameter_normalized(self.param, normalized_default); } + // TODO: egui-baseview doesn't seem to (re)set the modifiers correctly in some cases. For + // instance, dragging outside of a window, pressing or releasing shift, and then moving back + // into the window causes the old state to be stuck. Presumably it only modifies this based on + // keybaord events and not based on mouse events. fn granular_drag(&self, ui: &Ui, drag_delta: Vec2) { // Remember the intial position when we started with the granular drag. This value gets // reset whenever we have a normal itneraction with the slider.