diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-07-03 23:32:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-03 23:32:29 +0200 |
commit | 2036273f944084ccbe2483619d4f4b3de48a322c (patch) | |
tree | a6dd6059b537fe7a0a1ff6751158474ec91ccccb /editor/editor_node.cpp | |
parent | 1a2ea9ba1b82689eb55aafd53cd22c44591ed1cd (diff) | |
parent | 003a49eb66a3af2a677587b37206828aad5bcfbc (diff) |
Merge pull request #9462 from Noshyaar/pr2
SceneTab: MMB or double LMB to create new scene
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 2274690569..d83b808676 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -4392,8 +4392,14 @@ void EditorNode::_scene_tab_input(const Ref<InputEvent> &p_input) { Ref<InputEventMouseButton> mb = p_input; if (mb.is_valid()) { - if (mb->get_button_index() == BUTTON_MIDDLE && mb->is_pressed() && scene_tabs->get_hovered_tab() >= 0) { - _scene_tab_closed(scene_tabs->get_hovered_tab()); + if (scene_tabs->get_hovered_tab() >= 0) { + if (mb->get_button_index() == BUTTON_MIDDLE && mb->is_pressed()) { + _scene_tab_closed(scene_tabs->get_hovered_tab()); + } + } else { + if ((mb->get_button_index() == BUTTON_LEFT && mb->is_doubleclick()) || (mb->get_button_index() == BUTTON_MIDDLE && mb->is_pressed())) { + _menu_option_confirm(FILE_NEW_SCENE, true); + } } } } |