diff options
author | Franklin Sobrinho <franklin_gs@hotmail.com> | 2016-01-08 08:27:34 -0300 |
---|---|---|
committer | Franklin Sobrinho <franklin_gs@hotmail.com> | 2016-01-08 08:27:34 -0300 |
commit | 7fa3bd4e78a36e32c7020e92c74974a6d30051ae (patch) | |
tree | 80a0cfcd18b8bfedb7fef273ea86bcb850f639f9 /tools/editor/editor_node.cpp | |
parent | a0c39a4b333a2f05c9bb2ccf1be71ac8e18fc9a9 (diff) |
Quick open now can open multiple scenes and scripts
Diffstat (limited to 'tools/editor/editor_node.cpp')
-rw-r--r-- | tools/editor/editor_node.cpp | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 9fe0409c0e..4fbd2c0b69 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -2076,21 +2076,21 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { } break; case FILE_QUICK_OPEN_SCENE: { - quick_open->popup("PackedScene"); + quick_open->popup("PackedScene", true); quick_open->set_title("Quick Open Scene.."); } break; case FILE_QUICK_OPEN_SCRIPT: { - quick_open->popup("Script"); + quick_open->popup("Script", true); quick_open->set_title("Quick Open Script.."); } break; case FILE_QUICK_OPEN_FILE: { - quick_open->popup("Resource",false,true); + quick_open->popup("Resource", false, true); quick_open->set_title("Quick Search File.."); } break; @@ -3927,19 +3927,26 @@ void EditorNode::hide_animation_player_editors() { emit_signal("hide_animation_player_editors"); } -void EditorNode::_quick_opened(const String& p_resource) { +void EditorNode::_quick_opened() { if (current_option==FILE_QUICK_OPEN_FILE) { - scenes_dock->open(p_resource); + String res_path = quick_open->get_selected(); + + scenes_dock->open(res_path); return; } - if (quick_open->get_base_type()=="PackedScene") { - open_request(p_resource); - } else { - load_resource(p_resource); - } + Vector<String> files = quick_open->get_selected_files(); + + for (int i = 0; i < files.size(); i++) { + String res_path = files[i]; + if (quick_open->get_base_type()=="PackedScene") { + open_request(res_path); + } else { + load_resource(res_path); + } + } } void EditorNode::_quick_run(const String& p_resource) { |