emilk / egui

egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
https://www.egui.rs/
Apache License 2.0
20.61k stars 1.49k forks source link

Reset `Memory::popup` to `None` if a popup was abandoned #4697

Open juancampa opened 5 days ago

juancampa commented 5 days ago

BEFORE

https://github.com/emilk/egui/assets/1410520/d35168ae-cde8-479a-bb4a-79873b5ce685

AFTER

https://github.com/emilk/egui/assets/1410520/e9f367d8-38f0-4be1-b3d9-fda505c7b625

Notice that WRONG flashes for one frame. That's expected because on the frame the combo box disappears, any_popup_open still returns true, since we don't know it has disappeared until the end of the frame.