1 parent e88c9ae commit 9ccce05Copy full SHA for 9ccce05
1 file changed
Assets/com.alelievr.NodeGraphProcessor/Editor/Views/ToolbarView.cs
@@ -43,7 +43,11 @@ public ToolbarView(BaseGraphView graphView)
43
name = "ToolbarView";
44
this.graphView = graphView;
45
46
- graphView.initialized += AddButtons;
+ graphView.initialized += () => {
47
+ leftButtonDatas.Clear();
48
+ rightButtonDatas.Clear();
49
+ AddButtons();
50
+ };
51
52
Add(new IMGUIContainer(DrawImGUIToolbar));
53
}
@@ -129,9 +133,6 @@ protected void ShowButton(string name)
129
133
130
134
protected virtual void AddButtons()
131
135
{
132
- leftButtonDatas.Clear();
- rightButtonDatas.Clear();
-
136
AddButton("Center", graphView.ResetPositionAndZoom);
137
138
bool processorVisible = graphView.GetPinnedElementStatus< ProcessorView >() != Status.Hidden;
0 commit comments