forked from 1b-agent/opencadstudio-upstream
feat(save): warn before dropping AEC/Civil objects or overwriting on Save-As
Two in-canvas confirmations on the Save-As path: - AEC/Civil drop warning: when the drawing carries unsupported AEC/Civil (application) objects that survive only as verbatim source-version bytes, saving to a different version or to DXF would silently drop them. The dialog reports the count and offers "Save in source version" (keep) vs "Save anyway" (drop). Same-version DWG saves are lossless and skip it. - Overwrite confirmation: when the chosen filename already exists in the target folder, "Replace" / "Cancel" before clobbering it. The two chain (AEC first, then overwrite) via per-flow acknowledgement flags reset whenever the Save dialog opens or closes. Detection is a new io::dropped_on_save_count over the document's Unknown (raw-passthrough) objects/entities. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
ab9285f114
commit
b77187e672
7 files changed
+267
-1
No files matched your search
@@ -2527,6 +2527,19 @@ impl OpenCADStudio {
|
||||
|
||||
Message::UnsavedDialogSave => self.on_unsaved_dialog_save(),
|
||||
|
||||
Message::AecDropSameVersion => self.on_aec_drop_same_version(),
|
||||
Message::AecDropProceed => self.on_aec_drop_proceed(),
|
||||
Message::AecDropBack => {
|
||||
self.active_modal = Some(crate::app::ModalKind::SaveDialog);
|
||||
Task::none()
|
||||
}
|
||||
|
||||
Message::OverwriteConfirm => self.on_overwrite_confirm(),
|
||||
Message::OverwriteCancel => {
|
||||
self.active_modal = Some(crate::app::ModalKind::SaveDialog);
|
||||
Task::none()
|
||||
}
|
||||
|
||||
Message::UnsavedPickedSavePath(Some(path)) => {
|
||||
self.on_unsaved_picked_save_path_some(path)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user