Add a revert menu item.
This commit is contained in:
parent
67d357191f
commit
977b190a2d
2 changed files with 15 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -127,6 +127,7 @@ class EditorNode : public Node {
|
|||
FILE_EXTERNAL_OPEN_SCENE,
|
||||
EDIT_UNDO,
|
||||
EDIT_REDO,
|
||||
EDIT_REVERT,
|
||||
RESOURCE_NEW,
|
||||
RESOURCE_LOAD,
|
||||
RESOURCE_SAVE,
|
||||
|
|
Loading…
Reference in a new issue