mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-24 10:16:59 -06:00
Place: the dropped-file loop stays out of the web build
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user