1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

eframe: Fix clicks in web (#3640)

Closes https://github.com/emilk/egui/issues/3633

Bug introduced in #3623 (after 0.24.0 was cut)
This commit is contained in:
Emil Ernerfeldt
2023-11-27 08:37:02 +01:00
committed by GitHub
parent fbccd3a1a2
commit 43e7b16bb1
2 changed files with 21 additions and 16 deletions

View File

@@ -173,20 +173,8 @@ impl AppRunner {
self.painter.destroy();
}
/// Runs the user code and paints the UI.
///
/// If there is already an outstanding frame of output,
/// that is painted instead.
pub fn run_and_paint(&mut self) {
if self.clipped_primitives.is_none() {
// Run user code, and paint the results:
self.logic();
self.paint();
} else {
// We have already run the logic, e.g. in an on-click event,
// so let's only present the results:
self.paint();
}
pub fn has_outstanding_paint_data(&self) -> bool {
self.clipped_primitives.is_some()
}
/// Runs the logic, but doesn't paint the result.