Fix #113052: Node panel state change not updating Node Editor

When collapsing/expanding panels from the Properties Editor, the Node
Editor was not updated immediately.

Now add notifier for this case.

Pull Request: https://projects.blender.org/blender/blender/pulls/113054
This commit is contained in:
Philipp Oeser 2023-09-29 13:17:52 +02:00 committed by Philipp Oeser
parent d6b86f278b
commit 2d1cbac809
1 changed files with 5 additions and 0 deletions

View File

@ -45,6 +45,8 @@
#include "ED_undo.hh"
#include "WM_api.hh"
using blender::nodes::NodeDeclaration;
namespace blender::ed::space_node {
@ -775,6 +777,9 @@ static void node_panel_toggle_button_cb(bContext *C, void *panel_state_argv, voi
panel_state->flag ^= NODE_PANEL_COLLAPSED;
ED_node_tree_propagate_change(C, bmain, ntree);
/* Make sure panel state updates from the Properties Editor, too. */
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_NODE_VIEW, nullptr);
}
static void ui_node_draw_panel(uiLayout &layout,