1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #29645 from YeldhamDev/create_dialog_reselect

Allow reselecting items in the "Favorites" and "Recent" lists in the create dialog
This commit is contained in:
Rémi Verschelde
2019-06-12 22:58:09 +02:00
committed by GitHub

View File

@@ -730,6 +730,7 @@ CreateDialog::CreateDialog() {
fav_vb->add_margin_child(TTR("Favorites:"), favorites, true); fav_vb->add_margin_child(TTR("Favorites:"), favorites, true);
favorites->set_hide_root(true); favorites->set_hide_root(true);
favorites->set_hide_folding(true); favorites->set_hide_folding(true);
favorites->set_allow_reselect(true);
favorites->connect("cell_selected", this, "_favorite_selected"); favorites->connect("cell_selected", this, "_favorite_selected");
favorites->connect("item_activated", this, "_favorite_activated"); favorites->connect("item_activated", this, "_favorite_activated");
favorites->set_drag_forwarding(this); favorites->set_drag_forwarding(this);
@@ -744,6 +745,7 @@ CreateDialog::CreateDialog() {
rec_vb->add_margin_child(TTR("Recent:"), recent, true); rec_vb->add_margin_child(TTR("Recent:"), recent, true);
recent->set_hide_root(true); recent->set_hide_root(true);
recent->set_hide_folding(true); recent->set_hide_folding(true);
recent->set_allow_reselect(true);
recent->connect("cell_selected", this, "_history_selected"); recent->connect("cell_selected", this, "_history_selected");
recent->connect("item_activated", this, "_history_activated"); recent->connect("item_activated", this, "_history_activated");
recent->add_constant_override("draw_guides", 1); recent->add_constant_override("draw_guides", 1);