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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user