From 4f4513f99ce2ed679b571e2dc96ba8ab4dd914a9 Mon Sep 17 00:00:00 2001 From: James Buck Date: Wed, 29 May 2019 15:20:39 -0500 Subject: [PATCH] Remove some redundant lines --- editor/editor_file_dialog.cpp | 7 +------ modules/visual_script/visual_script_editor.cpp | 3 --- scene/gui/file_dialog.cpp | 4 ---- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 724b821267b..3d198dec67f 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -710,7 +710,6 @@ void EditorFileDialog::update_file_list() { } String cdir = dir_access->get_current_dir(); - bool skip_pp = access == ACCESS_RESOURCES && cdir == "res://"; dir_access->list_dir_begin(); @@ -733,7 +732,7 @@ void EditorFileDialog::update_file_list() { if (show_hidden || !ishidden) { if (!isdir) files.push_back(item); - else if (item != ".." || !skip_pp) + else dirs.push_back(item); } } @@ -764,8 +763,6 @@ void EditorFileDialog::update_file_list() { dirs.pop_front(); } - dirs.clear(); - List patterns; // build filter if (filter->get_selected() == filter->get_item_count() - 1) { @@ -864,8 +861,6 @@ void EditorFileDialog::update_file_list() { break; } } - - files.clear(); } void EditorFileDialog::_filter_selected(int) { diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 6bbfb1ec5c5..aad6e95845c 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -3619,7 +3619,6 @@ VisualScriptEditor::VisualScriptEditor() { edit_signal_dialog = memnew(AcceptDialog); edit_signal_dialog->get_ok()->set_text(TTR("Close")); add_child(edit_signal_dialog); - edit_signal_dialog->set_title(TTR("Edit Signal Arguments:")); signal_editor = memnew(VisualScriptEditorSignalEdit); edit_signal_edit = memnew(EditorInspector); @@ -3630,7 +3629,6 @@ VisualScriptEditor::VisualScriptEditor() { edit_variable_dialog = memnew(AcceptDialog); edit_variable_dialog->get_ok()->set_text(TTR("Close")); add_child(edit_variable_dialog); - edit_variable_dialog->set_title(TTR("Edit Variable:")); variable_editor = memnew(VisualScriptEditorVariableEdit); edit_variable_edit = memnew(EditorInspector); @@ -3641,7 +3639,6 @@ VisualScriptEditor::VisualScriptEditor() { select_base_type = memnew(CreateDialog); select_base_type->set_base_type("Object"); //anything goes select_base_type->connect("create", this, "_change_base_type_callback"); - select_base_type->get_ok()->set_text(TTR("Change")); add_child(select_base_type); undo_redo = EditorNode::get_singleton()->get_undo_redo(); diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index 5671b41de8c..bdb13420199 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -431,8 +431,6 @@ void FileDialog::update_file_list() { dirs.pop_front(); } - dirs.clear(); - List patterns; // build filter if (filter->get_selected() == filter->get_item_count() - 1) { @@ -507,8 +505,6 @@ void FileDialog::update_file_list() { if (tree->get_root() && tree->get_root()->get_children() && tree->get_selected() == NULL) tree->get_root()->get_children()->select(0); - - files.clear(); } void FileDialog::_filter_selected(int) {