Merge pull request #23326 from YeldhamDev/search_results_fix

Fix issues with the "Search Results" panel
This commit is contained in:
Rémi Verschelde 2018-10-29 17:18:53 +01:00 committed by GitHub
commit 786ece2375
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1363,7 +1363,9 @@ void ScriptEditor::_notification(int p_what) {
if (is_visible()) {
find_in_files_button->show();
} else {
find_in_files->hide();
if (find_in_files->is_visible_in_tree()) {
editor->hide_bottom_panel();
}
find_in_files_button->hide();
}
@ -2806,8 +2808,7 @@ void ScriptEditor::_start_find_in_files(bool with_replace) {
find_in_files->set_with_replace(with_replace);
find_in_files->start_search();
find_in_files_button->set_pressed(true);
find_in_files->show();
editor->make_bottom_panel_item_visible(find_in_files);
}
void ScriptEditor::_on_find_in_files_modified_files(PoolStringArray paths) {
@ -3174,7 +3175,6 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
add_child(find_in_files_dialog);
find_in_files = memnew(FindInFilesPanel);
find_in_files_button = editor->add_bottom_panel_item(TTR("Search Results"), find_in_files);
find_in_files_button->set_tooltip(TTR("Search in files"));
find_in_files->set_custom_minimum_size(Size2(0, 200) * EDSCALE);
find_in_files->connect(FindInFilesPanel::SIGNAL_RESULT_SELECTED, this, "_on_find_in_files_result_selected");
find_in_files->connect(FindInFilesPanel::SIGNAL_FILES_MODIFIED, this, "_on_find_in_files_modified_files");