From 347cbae4304b617820bed0e3f36429ce1b934acf Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Thu, 22 Sep 2022 17:08:17 +0200 Subject: [PATCH] Use egui's own redraw forcing function --- nih_plug_egui/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nih_plug_egui/src/lib.rs b/nih_plug_egui/src/lib.rs index c1dcd088..3ad0a109 100644 --- a/nih_plug_egui/src/lib.rs +++ b/nih_plug_egui/src/lib.rs @@ -162,15 +162,14 @@ where }, state, |_, _, _| {}, - move |egui_ctx, queue, state| { + move |egui_ctx, _queue, state| { let setter = ParamSetter::new(context.as_ref()); // For now, just always redraw. Most plugin GUIs have meters, and those almost always // need a redraw. Later we can try to be a bit more sophisticated about this. Without // this we would also have a blank GUI when it gets first opened because most DAWs open // their GUI while the window is still unmapped. - // TODO: Are there other useful parts of this queue we could pass to thep lugin? - queue.request_repaint(); + egui_ctx.request_repaint(); (update)(egui_ctx, &setter, &mut state.write()); }, );