summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/editor/editor_node.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index b4a9ca3b7a..a48545d152 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -1974,8 +1974,15 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
if (!scene)
break;
+
+ if (unsaved_cache && !p_confirmed) {
+ confirmation->get_ok()->set_text("Revert");
+ confirmation->set_text("This action cannot be undone. Revert anyway?");
+ confirmation->popup_centered(Size2(300,70));
+ break;
+ }
- open_request(scene->get_filename());
+ Error err = load_scene(scene->get_filename());
} break;