feat(block-editor): add Test Block preview

Preview the current unsaved block in a disposable drawing with independent history. Keep normal Draw tools available, append Close Test Block, and return to the original editor without saving. Guard persistence paths and handle refresh and parent-close lifecycle by stable document identity.
This commit is contained in:
Karim Jerbi committed 2026-10-14 14:44:58 +01:00
1 parent 0a29be07f7
commit 9632979d09
22 files changed
+801 -65

No files matched your search

+2
View File
@@ -207,6 +207,7 @@ pub(super) struct DocumentTab {
pub(super) history: HistoryState,
/// Drawing history is suspended while `history` belongs to BEDIT.
pub(super) block_edit_history: Option<super::block_editor::BlockEditHistory>,
pub(super) block_test: Option<super::block_test::BlockTestSession>,
pub(super) active_layer: String,
/// Block references whose properties panel shows per-axis Scale X/Y/Z even
/// though the three factors are currently equal — the user unchecked the
@@ -660,6 +661,7 @@ impl DocumentTab {
dyn_active: 0,
history: HistoryState::default(),
block_edit_history: None,
block_test: None,
active_layer: "0".to_string(),
props_asym_scale: std::collections::HashSet::new(),
graph: Default::default(),