| 405 | } |
| 406 | |
| 407 | void ScriptEditorQuickOpen::_update_search() { |
| 408 | search_options->clear(); |
| 409 | TreeItem *root = search_options->create_item(); |
| 410 | |
| 411 | for (int i = 0; i < functions.size(); i++) { |
| 412 | String file = functions[i]; |
| 413 | if ((search_box->get_text().is_empty() || file.containsn(search_box->get_text()))) { |
| 414 | TreeItem *ti = search_options->create_item(root); |
| 415 | ti->set_text(0, file); |
| 416 | if (root->get_first_child() == ti) { |
| 417 | ti->select(0); |
| 418 | } |
| 419 | } |
| 420 | } |
| 421 | |
| 422 | get_ok_button()->set_disabled(root->get_first_child() == nullptr); |
| 423 | } |
| 424 | |
| 425 | void ScriptEditorQuickOpen::_confirmed() { |
| 426 | TreeItem *ti = search_options->get_selected(); |
nothing calls this directly
no test coverage detected