Improve TreeItem API and allow to move nodes

This commit is contained in:
trollodel 2021-03-07 21:07:30 +01:00
parent 92c04fa727
commit bca0d36fe6
28 changed files with 527 additions and 289 deletions

View file

@ -339,13 +339,13 @@ void ScriptEditorQuickOpen::_update_search() {
if ((search_box->get_text() == "" || file.findn(search_box->get_text()) != -1)) {
TreeItem *ti = search_options->create_item(root);
ti->set_text(0, file);
if (root->get_children() == ti) {
if (root->get_first_child() == ti) {
ti->select(0);
}
}
}
get_ok_button()->set_disabled(root->get_children() == nullptr);
get_ok_button()->set_disabled(root->get_first_child() == nullptr);
}
void ScriptEditorQuickOpen::_confirmed() {