Fix the display of the tree diagram and optimize performance

Fix the display of the tree diagram and optimize performance.
This commit is contained in:
kitsdream
2023-10-29 02:13:58 +08:00
committed by kitsdream
parent 0d50c6277f
commit 706194e054
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_old;
bool port_node_exists = false;
bool port_node_exists;
if (script->get_node(port_action_node).is_valid()) {
if (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) {
vnode_old = script->get_node(port_action_node);
}

View File

@@ -566,7 +566,7 @@ VisualScriptPropertySelector::VisualScriptPropertySelector() {
ScrollContainer *scroller = memnew(ScrollContainer);
scroller->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
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);
help_bit = memnew(EditorHelpBit);