Fix #124637: Double spacing for inline sockets #124658

Merged
Jacques Lucke merged 1 commits from mod_moder/blender:fix_124637 into main 2024-07-14 12:33:56 +02:00

View File

@ -825,6 +825,7 @@ static void add_panel_items_recursive(const bContext &C,
}
}
else if (item.is_valid_socket()) {
bool need_socket_spacing = false;
if (item.input) {
/* Draw buttons before the first input. */
if (!state.buttons_drawn) {
@ -839,7 +840,7 @@ static void add_panel_items_recursive(const bContext &C,
else {
/* Space between items. */
if (!state.is_first && item.input->is_visible()) {
locy -= NODE_ITEM_SPACING_Y;
need_socket_spacing = true;
}
}
}
@ -851,10 +852,13 @@ static void add_panel_items_recursive(const bContext &C,
else {
/* Space between items. */
if (!state.is_first && item.output->is_visible()) {
locy -= NODE_ITEM_SPACING_Y;
need_socket_spacing = true;
}
}
}
if (need_socket_spacing) {
locy -= NODE_ITEM_SPACING_Y;
}
if (!is_parent_collapsed &&
node_update_basis_socket(