1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fix GraphNode resizing when its bottom border is too thin

This commit is contained in:
Michael Alexsander
2023-02-23 01:40:27 -03:00
parent 19c9fd6926
commit c567a853db
2 changed files with 29 additions and 21 deletions

View File

@@ -805,13 +805,13 @@ void GraphNode::_connpos_update() {
Size2i size = c->get_rect().size;
int y = sb->get_margin(SIDE_TOP) + vofs;
int h = size.y;
int h = size.height;
if (slot_info.has(idx)) {
if (slot_info[idx].enable_left) {
PortCache cc;
cc.position = Point2i(edgeofs, y + h / 2);
cc.height = size.height;
cc.height = h;
cc.slot_idx = idx;
cc.type = slot_info[idx].type_left;
@@ -822,7 +822,7 @@ void GraphNode::_connpos_update() {
if (slot_info[idx].enable_right) {
PortCache cc;
cc.position = Point2i(get_size().width - edgeofs, y + h / 2);
cc.height = size.height;
cc.height = h;
cc.slot_idx = idx;
cc.type = slot_info[idx].type_right;
@@ -833,7 +833,7 @@ void GraphNode::_connpos_update() {
}
vofs += sep;
vofs += size.y;
vofs += h;
idx++;
}