Skip to content

Commit

Permalink
Set canvas state to idle after adding new connection
Browse files Browse the repository at this point in the history
When a new connection is added to the view model, the canvas state is now set to idle. This change helps to ensure that the canvas is properly reset and ready for the next interaction.
  • Loading branch information
xorza committed May 19, 2024
1 parent 5a31826 commit 9054c23
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ScenariumEditor.NET/ScenariumEditor.NET/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ private void GraphCanvasBg_OnButtonDown(object sender, MouseButtonEventArgs e) {
if (_nearestPin != null) {
_viewModel.Connections.Add(new Connection(_activePin, _nearestPin));
CancelNewConnection();
_canvasState = CanvasState.Idle;
}

return;
Expand Down

0 comments on commit 9054c23

Please sign in to comment.