VectorCraft: An open-source, vector art tool written by scratch in pure Rust
Build: the wasm check is warning-free; one file-dialog check instead of two
Taha-Mahmoodid4df4646ee16
diff --git a/apps/vectorcraft/src/main.rs b/apps/vectorcraft/src/main.rsindex d3204c4ca..450d52b9b 100644--- a/apps/vectorcraft/src/main.rs+++ b/apps/vectorcraft/src/main.rs@@ -144,11 +144,7 @@ impl App {// again on its document when it answers.#[cfg(target_os = "macos")]if !self.app.file_dialog_open() {- // Files from the Finder and the Dock wait while a file dialog is open: what asked for it runs- // again on its document when it answers.- if !self.app.file_dialog_open() {- open_files(&mut self.app, open_documents::take());- }+ open_files(&mut self.app, open_documents::take());}self.app.logic(ctx);window::track(ctx, &mut self.app.ui.window);diff --git a/crates/engine/src/store.rs b/crates/engine/src/store.rsindex 7e3a860a3..0e85391fc 100644--- a/crates/engine/src/store.rs+++ b/crates/engine/src/store.rs@@ -204,6 +204,7 @@ impl Session {}/// Write the profile `name` (its file's `bytes`) to the store; `false` when it didn't go there.+ #[cfg(not(target_arch = "wasm32"))]pub(crate) fn store_profile(&self, name: &str, bytes: &[u8]) -> bool {self.profile_dir.as_deref().is_some_and(|dir| put(dir, &format!("{}.{PROFILE_EXT}", file_stem(name)), bytes))}diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rsindex 4a665906a..99fca2072 100644--- a/crates/ui-egui/src/lib.rs+++ b/crates/ui-egui/src/lib.rs@@ -486,6 +486,7 @@ pub struct VectorcraftApp {/// the answer.font_check: Option<(std::sync::mpsc::Receiver<bool>, bool)>,/// When installed fonts were last checked in line (app time, s).+ #[cfg(not(target_arch = "wasm32"))]font_install_check_at: f64,/// Keyboard pastes of something other than text (see [`shortcuts::PasteChord`]).pub(crate) paste_chord: shortcuts::PasteChord,@@ -535,6 +536,7 @@ struct PendingScreenshot {/// Seconds between two looks at the system clipboard for [`VectorcraftApp::system_paste`].const SYSTEM_CLIPBOARD_POLL: f64 = 0.25;/// Seconds between looks for fonts a font manager activated while the app stays in front (#2576).+#[cfg(not(target_arch = "wasm32"))]const FONT_INSTALL_POLL: f64 = 2.0;impl VectorcraftApp {@@ -601,6 +603,7 @@ impl VectorcraftApp {picks: picks::Picks::default(),screen_sampler: None,font_check: None,+ #[cfg(not(target_arch = "wasm32"))]font_install_check_at: f64::NEG_INFINITY,paste_chord: Default::default(),background: Default::default(),