소스 검색

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;