X Tutup
Skip to content

Fix drawing of slot icons in GraphNode when slots are not continuous#112245

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
detomon:fix-graph-node-slot-draw
Nov 1, 2025
Merged

Fix drawing of slot icons in GraphNode when slots are not continuous#112245
akien-mga merged 1 commit intogodotengine:masterfrom
detomon:fix-graph-node-slot-draw

Conversation

@detomon
Copy link
Contributor

@detomon detomon commented Oct 31, 2025

Fixes: #107298

@detomon detomon requested a review from a team as a code owner October 31, 2025 13:52
@AThousandShips AThousandShips added bug topic:gui cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release labels Oct 31, 2025
@AThousandShips AThousandShips added this to the 4.6 milestone Oct 31, 2025
Comment on lines 686 to 694
if (slot.draw_stylebox) {
Control *child = Object::cast_to<Control>(get_child(E.key, false));
if (!child || !child->is_visible_in_tree()) {
continue;
Control *child = Object::cast_to<Control>(get_child(slot_index, false));
if (child && child->is_visible_in_tree()) {
Rect2 child_rect = child->get_rect();
child_rect.position.x = sb_panel->get_margin(SIDE_LEFT);
child_rect.size.width = width;
draw_style_box(sb_slot, child_rect);
}
Rect2 child_rect = child->get_rect();
child_rect.position.x = sb_panel->get_margin(SIDE_LEFT);
child_rect.size.width = width;
draw_style_box(sb_slot, child_rect);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rearranged this part to remove the continue, which may lead to code being skipped below this block by accident (if something is added below in the future).

Copy link
Member

@kleonc kleonc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, fixes the issue.

@akien-mga akien-mga merged commit 9785a66 into godotengine:master Nov 1, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 4.5.2.

@akien-mga akien-mga removed the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GraphNode set_slot_custom_icon_ function uses the order on which ports were enabled instead of the slot index.

4 participants

X Tutup