Fix GraphNode resizing when its bottom border is too thin

(cherry picked from commit c567a853db)
This commit is contained in:
Michael Alexsander 2023-02-23 01:40:27 -03:00 committed by Yuri Sizov
parent 6ed9e03449
commit bf8ab62ca3
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++;
}