Fix #139449: Show gizmos in viewport when selecting gizmo nodes

When selecting gizmo nodes using box selection, circle selection, or
lasso selection, the gizmos don't show in the viewport.

This is fixed by notifying that the gizmo nodes have been updated to
redraw the gizmos using `WM_event_add_notifier`.

Pull Request: https://projects.blender.org/blender/blender/pulls/139728
This commit is contained in:
Marc Hamamji
2025-06-03 12:00:45 +02:00
committed by Jacques Lucke
parent b261d878eb
commit 9c33e27394

View File

@@ -799,6 +799,7 @@ static wmOperatorStatus node_box_select_exec(bContext *C, wmOperator *op)
tree_draw_order_update(node_tree);
WM_event_add_notifier(C, NC_NODE | NA_SELECTED, nullptr);
WM_event_add_notifier(C, NC_NODE | ND_NODE_GIZMO, nullptr);
return OPERATOR_FINISHED;
}
@@ -900,6 +901,7 @@ static wmOperatorStatus node_circleselect_exec(bContext *C, wmOperator *op)
}
WM_event_add_notifier(C, NC_NODE | NA_SELECTED, nullptr);
WM_event_add_notifier(C, NC_NODE | ND_NODE_GIZMO, nullptr);
return OPERATOR_FINISHED;
}
@@ -1004,6 +1006,7 @@ static bool do_lasso_select_node(bContext *C, const Span<int2> mcoords, eSelectO
if (changed) {
WM_event_add_notifier(C, NC_NODE | NA_SELECTED, nullptr);
WM_event_add_notifier(C, NC_NODE | ND_NODE_GIZMO, nullptr);
}
return changed;