summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Laurie von Massenbach <felix@erbridge.co.uk>2015-01-25 00:14:06 +0000
committerFelix Laurie von Massenbach <felix@erbridge.co.uk>2015-01-25 00:14:06 +0000
commit977b190a2d2f7b5bc252c10836114661702e001e (patch)
tree3ea10d2f6e3d7c4b999fd3a5d769c08142d9cd48
parent67d357191ff74b2cfc80015941363a97e7ee19fd (diff)
Add a revert menu item.
-rw-r--r--tools/editor/editor_node.cpp14
-rw-r--r--tools/editor/editor_node.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 6ff16e661c..c5604ffaf9 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -1967,6 +1967,18 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
log->add_message("REDO: "+action);
} break;
+
+ case EDIT_REVERT: {
+
+ Node *scene = get_edited_scene();
+
+ if (!scene)
+ break;
+
+ open_request(scene->get_filename());
+
+ } break;
+
#if 0
case NODE_EXTERNAL_INSTANCE: {
@@ -3465,6 +3477,8 @@ EditorNode::EditorNode() {
p->add_item("Undo",EDIT_UNDO,KEY_MASK_CMD+KEY_Z);
p->add_item("Redo",EDIT_REDO,KEY_MASK_CMD+KEY_MASK_SHIFT+KEY_Z);
p->add_separator();
+ p->add_item("Revert Scene",EDIT_REVERT);
+ p->add_separator();
p->add_item("Run Script",FILE_RUN_SCRIPT,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_R);
p->add_separator();
p->add_item("Project Settings",RUN_SETTINGS);
diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h
index 7560c2b149..54b9dc2b0b 100644
--- a/tools/editor/editor_node.h
+++ b/tools/editor/editor_node.h
@@ -127,6 +127,7 @@ class EditorNode : public Node {
FILE_EXTERNAL_OPEN_SCENE,
EDIT_UNDO,
EDIT_REDO,
+ EDIT_REVERT,
RESOURCE_NEW,
RESOURCE_LOAD,
RESOURCE_SAVE,