From 7f5fde6459a1180a6aa3bcb89f4b6d3298111041 Mon Sep 17 00:00:00 2001 From: Vincenzo Greco Date: Mon, 8 Jan 2018 11:44:56 +0100 Subject: [PATCH] Select root node if search_box is empty in create_dialog (cherry picked from commit 586e7351252b8c0a3c29b31e51c0959e76f4a531) --- editor/create_dialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index 48ceb82dc35..fdc58e62926 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -316,6 +316,10 @@ void CreateDialog::_update_search() { } } + if (search_box->get_text() == "") { + to_select = root; + } + if (to_select) { to_select->select(0); search_options->scroll_to_item(to_select);