More scroll hint work around the editor
This commit is contained in:
@@ -2398,14 +2398,19 @@ SceneTreeDialog::SceneTreeDialog() {
|
||||
show_all_nodes->hide();
|
||||
filter_hbc->add_child(show_all_nodes);
|
||||
|
||||
MarginContainer *mc = memnew(MarginContainer);
|
||||
mc->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
mc->set_theme_type_variation("NoBorderHorizontalWindow");
|
||||
content->add_child(mc);
|
||||
|
||||
tree = memnew(SceneTreeEditor(false, false, true));
|
||||
tree->set_update_when_invisible(false);
|
||||
tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
tree->get_scene_tree()->set_scroll_hint_mode(Tree::SCROLL_HINT_MODE_BOTH);
|
||||
tree->get_scene_tree()->connect("item_activated", callable_mp(this, &SceneTreeDialog::_select));
|
||||
// Initialize button state, must be done after the tree has been created to update its 'show_all_nodes' flag.
|
||||
// This is also done before adding the tree to the content to avoid triggering unnecessary tree filtering.
|
||||
show_all_nodes->set_pressed(EditorSettings::get_singleton()->get_project_metadata("editor_metadata", "show_all_nodes_for_node_selection", false));
|
||||
content->add_child(tree);
|
||||
mc->add_child(tree);
|
||||
|
||||
// Disable the OK button when no node is selected.
|
||||
get_ok_button()->set_disabled(!tree->get_selected());
|
||||
|
||||
Reference in New Issue
Block a user