@@ -69,6 +69,7 @@ protected override void OnDataContextChanged(EventArgs e)
6969 ( double canvasWidth , double canvasHeight ) = viewModel . GetCanvasDimensions ( ) ;
7070 CanvasScrollViewer . Offset = new Vector ( canvasWidth / 2 , canvasHeight / 2 ) ;
7171
72+ // Load in all the pointer tools
7273 viewModel . UiStateViewModel . AvailableTools . Clear ( ) ;
7374 var tools = new List < PointerTool >
7475 {
@@ -102,6 +103,7 @@ protected override void OnDataContextChanged(EventArgs e)
102103 }
103104 }
104105
106+ // If the active tool is a stroke tool, show its options else clear and hide the tool options UI
105107 private void OnActiveToolChanged ( PointerTool ? tool )
106108 {
107109 _activePointerTool = tool ;
@@ -354,7 +356,7 @@ private void SelectionBorder_OnPointerReleased(object? sender, PointerReleasedEv
354356 {
355357 if ( e . InitialPressMouseButton == MouseButton . Left && _viewModel != null )
356358 {
357- foreach ( var selection in _viewModel . SelectionTargets )
359+ foreach ( var unused in _viewModel . SelectionTargets )
358360 {
359361 _viewModel . ApplyEvent ( new EndStrokeEvent ( _selection . MoveActionId ) ) ;
360362 }
@@ -419,7 +421,7 @@ private void SelectionRotationBtn_OnPointerReleased(object? sender, PointerRelea
419421 {
420422 if ( e . InitialPressMouseButton == MouseButton . Left && _viewModel != null )
421423 {
422- foreach ( var selection in _viewModel . SelectionTargets )
424+ foreach ( var unused in _viewModel . SelectionTargets )
423425 {
424426 _viewModel . ApplyEvent ( new EndStrokeEvent ( _selection . RotateActionId ) ) ;
425427 }
@@ -482,7 +484,7 @@ private void ScaleHandle_OnPointerReleased(object? sender, PointerReleasedEventA
482484 {
483485 if ( e . InitialPressMouseButton == MouseButton . Left && _viewModel != null && _selection . ActiveScaleHandle != null )
484486 {
485- foreach ( var selection in _viewModel . SelectionTargets )
487+ foreach ( var unused in _viewModel . SelectionTargets )
486488 {
487489 _viewModel . ApplyEvent ( new EndStrokeEvent ( _selection . ScaleActionId ) ) ;
488490 }
0 commit comments