浏览代码

Fix math node showing three inputs when created

CPKreuz 9 月之前
父节点
当前提交
1da84c54f4
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/PixiEditor/ViewModels/Document/Nodes/MathNodeViewModel.cs

+ 3 - 2
src/PixiEditor/ViewModels/Document/Nodes/MathNodeViewModel.cs

@@ -27,10 +27,11 @@ internal class MathNodeViewModel : NodeViewModel<MathNode>
         Y = FindInputProperty("Y");
         Z = FindInputProperty("Z");
         
-        Mode.ValueChanged += ModeChanged;
+        Mode.ValueChanged += (_, _) => ModeChanged();
+        ModeChanged();
     }
 
-    private void ModeChanged(INodePropertyHandler property, NodePropertyValueChangedArgs args)
+    private void ModeChanged()
     {
         if (Mode.Value is not MathNodeMode mode)
             return;