diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-30 11:56:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-30 11:56:37 +0200 |
commit | 4e230d713487ea540ca534b11d0bdf225617a676 (patch) | |
tree | be9b50e5ad5dabf9e31d9daf9082f40bc04f222f | |
parent | 0da61614c050c208166f9f860e61b9f4b9e048bb (diff) | |
parent | bd278fdd65f459338fa6f3b4024079242f15568f (diff) |
Merge pull request #27148 from YeldhamDev/creatediag_force_guides
Force drawing guides in single-row Tree items in the editor
-rw-r--r-- | editor/create_dialog.cpp | 2 | ||||
-rw-r--r-- | editor/quick_open.cpp | 18 |
2 files changed, 14 insertions, 6 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index 26bd651c2b..ac42f15f7f 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -721,6 +721,7 @@ CreateDialog::CreateDialog() { favorites->connect("cell_selected", this, "_favorite_selected"); favorites->connect("item_activated", this, "_favorite_activated"); favorites->set_drag_forwarding(this); + favorites->add_constant_override("draw_guides", 1); VBoxContainer *rec_vb = memnew(VBoxContainer); vsc->add_child(rec_vb); @@ -733,6 +734,7 @@ CreateDialog::CreateDialog() { recent->set_hide_folding(true); recent->connect("cell_selected", this, "_history_selected"); recent->connect("item_activated", this, "_history_activated"); + recent->add_constant_override("draw_guides", 1); VBoxContainer *vbc = memnew(VBoxContainer); hsc->add_child(vbc); diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp index c197248c35..dc2f098333 100644 --- a/editor/quick_open.cpp +++ b/editor/quick_open.cpp @@ -255,14 +255,19 @@ void EditorQuickOpen::_confirmed() { void EditorQuickOpen::_notification(int p_what) { - if (p_what == NOTIFICATION_ENTER_TREE) { + switch (p_what) { - connect("confirmed", this, "_confirmed"); + case NOTIFICATION_ENTER_TREE: { - search_box->set_right_icon(get_icon("Search", "EditorIcons")); - search_box->set_clear_button_enabled(true); - } else if (p_what == NOTIFICATION_EXIT_TREE) { - disconnect("confirmed", this, "_confirmed"); + connect("confirmed", this, "_confirmed"); + + search_box->set_right_icon(get_icon("Search", "EditorIcons")); + search_box->set_clear_button_enabled(true); + } break; + case NOTIFICATION_EXIT_TREE: { + + disconnect("confirmed", this, "_confirmed"); + } break; } } @@ -297,6 +302,7 @@ EditorQuickOpen::EditorQuickOpen() { set_hide_on_ok(false); search_options->connect("item_activated", this, "_confirmed"); search_options->set_hide_root(true); + search_options->add_constant_override("draw_guides", 1); ei = "EditorIcons"; ot = "Object"; add_directories = false; |