Skip to content

Commit 6493962

Browse files
committed
some fix
1 parent 2c34e38 commit 6493962

File tree

6 files changed

+8
-4
lines changed

6 files changed

+8
-4
lines changed

SimpleStateMachineNodeEditor/SimpleStateMachineNodeEditor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<TargetFramework>netcoreapp3.1</TargetFramework>
66
<UseWPF>true</UseWPF>
77
<StartupObject>SimpleStateMachineNodeEditor.App</StartupObject>
8-
<ApplicationIcon>StateMachine_16x.ico</ApplicationIcon>
8+
<ApplicationIcon>StateMachine.ico</ApplicationIcon>
99
</PropertyGroup>
1010

1111
<ItemGroup>
File renamed without changes.

SimpleStateMachineNodeEditor/View/ViewNode.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ private void OnEventMouseLeftDowns(MouseButtonEventArgs e)
129129
}
130130
private void Validate(RoutedEventArgs e)
131131
{
132-
ViewModel.CommandValidateName.ExecuteWithSubscribe(NodeHeaderElement.TextBox.Text);
132+
if (NodeHeaderElement.TextBox.Text != ViewModel.Name)
133+
ViewModel.CommandValidateName.ExecuteWithSubscribe(NodeHeaderElement.TextBox.Text);
133134
if (NodeHeaderElement.TextBox.Text != ViewModel.Name)
134135
NodeHeaderElement.TextBox.Text = ViewModel.Name;
135136
}

SimpleStateMachineNodeEditor/View/ViewRightConnector.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ private void OnEventMouseOver(bool value)
9999
}
100100
private void Validate(RoutedEventArgs e)
101101
{
102-
ViewModel.CommandValidateName.ExecuteWithSubscribe(TextBoxElement.Text);
102+
if (TextBoxElement.Text != ViewModel.Name)
103+
ViewModel.CommandValidateName.ExecuteWithSubscribe(TextBoxElement.Text);
103104
if (TextBoxElement.Text != ViewModel.Name)
104105
TextBoxElement.Text = ViewModel.Name;
105106
}

SimpleStateMachineNodeEditor/ViewModel/NodesCanvas/ViewModelNodesCanvasCommands.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ private void ClearScheme()
236236
this.Nodes.Clear();
237237
this.Connects.Clear();
238238
this.SchemePath = "";
239+
this.NodesCount = 0;
239240

240241
this.SetupStartState();
241242
}

SimpleStateMachineNodeEditor/ViewModel/ViewModelNode.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ private void Move(MyPoint delta)
190190
}
191191
private void ValidateName(string newName)
192192
{
193-
NodesCanvas.CommandValidateNodeName.ExecuteWithSubscribe((this, newName));
193+
194+
NodesCanvas.CommandValidateNodeName.ExecuteWithSubscribe((this, newName));
194195
}
195196
private void UpdatePoint2()
196197
{

0 commit comments

Comments
 (0)