From 2de84801bdc67a4d1d30a9f74ce260b7411ee0ee Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Fri, 8 Apr 2022 09:58:31 -0400 Subject: [PATCH] move popup_id back --- src/widgets.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/widgets.rs b/src/widgets.rs index 0cec7ba..930102e 100644 --- a/src/widgets.rs +++ b/src/widgets.rs @@ -92,7 +92,6 @@ impl<'a> AutoComplete<'a> { .hint_forward(true) // Make the hint appear after the last text in the textbox .lock_focus(true); - let popup_id = ui.make_persistent_id("autocomplete_popup"); let te_id = ui.make_persistent_id(format!("text_edit_ac_{}", func_i)); if self.hint.is_none() { @@ -124,6 +123,8 @@ impl<'a> AutoComplete<'a> { if movement != Movement::Complete && let HintEnum::Many(hints) = self.hint { // Doesn't need to have a number in id as there should only be 1 autocomplete popup in the entire gui + let popup_id = ui.make_persistent_id("autocomplete_popup"); + let mut clicked = false; egui::popup_below_widget(ui, popup_id, &re, |ui| {