From f1118d826e4d3bd9cdc5bcafa3e41f8a42abf256 Mon Sep 17 00:00:00 2001 From: aiongg Date: Wed, 14 Oct 2026 17:15:50 +0000 Subject: [PATCH] Place: the dropped-file loop stays out of the web build --- crates/ui-egui/src/lib.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 928ff210..c1ca016b 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -934,11 +934,13 @@ impl DesignApp { menus::shortcuts(self, ctx); } #[cfg(not(target_arch = "wasm32"))] - let (dropped, pointer) = ctx.input(|i| (i.raw.dropped_files.clone(), i.pointer.hover_pos())); - for f in dropped { - let p = f.path().to_string_lossy().to_string(); - if !p.is_empty() { - let _ = self.open_dropped_at(&p, pointer); + { + let (dropped, pointer) = ctx.input(|i| (i.raw.dropped_files.clone(), i.pointer.hover_pos())); + for f in dropped { + let p = f.path().to_string_lossy().to_string(); + if !p.is_empty() { + let _ = self.open_dropped_at(&p, pointer); + } } } self.handle_quit(ctx);