1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Fix undoredo handling in some dialogs

This commit is contained in:
kobewi
2024-07-03 15:14:51 +02:00
parent 6a13fdcae3
commit 681769e2c9
7 changed files with 66 additions and 28 deletions

View File

@@ -5261,6 +5261,14 @@ bool EditorNode::has_scenes_in_session() {
return !scenes.is_empty();
}
void EditorNode::undo() {
trigger_menu_option(EDIT_UNDO, true);
}
void EditorNode::redo() {
trigger_menu_option(EDIT_REDO, true);
}
bool EditorNode::ensure_main_scene(bool p_from_native) {
pick_main_scene->set_meta("from_native", p_from_native); // Whether from play button or native run.
String main_scene = GLOBAL_GET("application/run/main_scene");