Merge pull request #76 from kitsdream/Next

Fix the display of the tree diagram and optimize performance
This commit is contained in:
K. S. Ernest (iFire) Lee
2023-10-28 14:23:46 -07:00
committed by GitHub
2 changed files with 7 additions and 6 deletions

View File

@@ -3650,12 +3650,13 @@ void VisualScriptEditor::_selected_connect_node(const String &p_text,
Ref<VisualScriptNode> vnode; Ref<VisualScriptNode> vnode;
Ref<VisualScriptNode> vnode_old; Ref<VisualScriptNode> vnode_old;
bool port_node_exists = false;
bool port_node_exists; if (script->has_node(port_action_node)) {
if (script->get_node(port_action_node).is_valid()) {
port_node_exists = script->has_node(port_action_node); port_node_exists = script->has_node(port_action_node);
} else {
port_node_exists = !script->has_node(port_action_node);
} }
if (port_node_exists && p_connecting) { if (port_node_exists && p_connecting) {
vnode_old = script->get_node(port_action_node); vnode_old = script->get_node(port_action_node);
} }

View File

@@ -566,7 +566,7 @@ VisualScriptPropertySelector::VisualScriptPropertySelector() {
ScrollContainer *scroller = memnew(ScrollContainer); ScrollContainer *scroller = memnew(ScrollContainer);
scroller->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED); scroller->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
scroller->set_v_size_flags(Control::SIZE_EXPAND_FILL); scroller->set_v_size_flags(Control::SIZE_EXPAND_FILL);
scroller->set_custom_minimum_size(Size2(600, 400) * EDSCALE); scroller->set_custom_minimum_size(Size2(480, 160) * EDSCALE);
vbox->add_child(scroller); vbox->add_child(scroller);
help_bit = memnew(EditorHelpBit); help_bit = memnew(EditorHelpBit);
@@ -880,12 +880,12 @@ if ((!_is_class_disabled_by_feature_profile(class_doc.name) &&
match.doc = &class_doc; match.doc = &class_doc;
// Match class name. // Match class name.
if (search_flags & SEARCH_CLASSES || _match_visual_script(class_doc)) { if (search_flags & SEARCH_CLASSES || _match_visual_script(class_doc)) {
if (term == "") { if (term == " ") {
match.name = !_match_is_hidden(class_doc); match.name = !_match_is_hidden(class_doc);
} else { } else {
match.name = _match_string(term, class_doc.name); match.name = _match_string(term, class_doc.name);
} }
// match.name = term == "" || _match_string(term, class_doc.name); // match.name = term == " " || _match_string(term, class_doc.name);
} }
// Match members if the term is long enough. // Match members if the term is long enough.