fix(save): decouple native saves from screenshots (#956)

This commit is contained in:
Hakan Seven committed 2026-09-03 21:06:19 +03:00
1 parent a581636aea
commit edd3faeeae
6 files changed
+62 -206

No files matched your search

-18
View File
@@ -671,8 +671,6 @@ pub(super) struct OpenCADStudio {
main_window: Option<window::Id>,
/// Hides drawing UI overlays for one thumbnail capture frame.
thumbnail_capture_clean: bool,
#[cfg(not(target_arch = "wasm32"))]
pending_native_thumbnail_save: Option<PendingNativeThumbnailSave>,
#[cfg(target_arch = "wasm32")]
pending_web_thumbnail_save: Option<PendingWebThumbnailSave>,
// ── Floating panel windows ────────────────────────────────────────────
@@ -1229,18 +1227,6 @@ pub(super) enum SaveContinuation {
Quit,
}
#[derive(Debug, Clone)]
#[cfg(not(target_arch = "wasm32"))]
pub(super) struct PendingNativeThumbnailSave {
tab_id: u64,
path: PathBuf,
version: acadrust::DxfVersion,
purpose: SavePurpose,
continuation: SaveContinuation,
set_current_path: bool,
check_external_change: bool,
}
#[derive(Debug, Clone)]
#[cfg(target_arch = "wasm32")]
pub(super) struct PendingWebThumbnailSave {
@@ -2063,8 +2049,6 @@ pub enum Message {
AutoSave,
/// A clean viewport frame is ready for thumbnail capture.
ThumbnailCaptureFrame,
/// Restore drawing UI after the compositor screenshot is captured.
ThumbnailCaptureFinished,
/// Native background save/autosave completed.
#[cfg(not(target_arch = "wasm32"))]
SaveFinished(SaveOutcome),
@@ -3389,8 +3373,6 @@ impl OpenCADStudio {
last_point: None,
main_window: None,
thumbnail_capture_clean: false,
#[cfg(not(target_arch = "wasm32"))]
pending_native_thumbnail_save: None,
#[cfg(target_arch = "wasm32")]
pending_web_thumbnail_save: None,
color_pick_target: None,