MCPcopy Create free account
hub / github.com/PerroEngine/Perro / redo_scene_doc

Function redo_scene_doc

perro_editor/res/scripts/editor/main.rs:173–185  ·  view source on GitHub ↗
(state: &mut EditorState)

Source from the content-addressed store, hash-verified

171}
172
173pub fn undo_scene_doc(state: &mut EditorState) -> bool {
174 let Some(prev) = state.scene_undo_stack.pop() else {
175 state.log = "undo\nempty".to_string();
176 return false;
177 };
178 if !state.doc_text.is_empty() {
179 state.scene_redo_stack.push(state.doc_text.clone());
180 }
181 state.doc_text = prev;
182 let _ = cached_scene_doc_shared(&state.doc_text);
183 state.dirty = true;
184 mark_active_scene_dirty(state);
185 state.log = format!("undo\n{} left", state.scene_undo_stack.len());
186 true
187}
188

Callers

nothing calls this directly

Calls 4

push_scene_undo_snapshotFunction · 0.85
cached_scene_doc_sharedFunction · 0.85
mark_active_scene_dirtyFunction · 0.85
popMethod · 0.45

Tested by

no test coverage detected