diff --git a/InkCanvasForClass/App.xaml.cs b/InkCanvasForClass/App.xaml.cs
index 4871188..415e92d 100644
--- a/InkCanvasForClass/App.xaml.cs
+++ b/InkCanvasForClass/App.xaml.cs
@@ -29,8 +29,7 @@ namespace Ink_Canvas
public static string[] StartArgs = null;
public static string RootPath = Environment.GetEnvironmentVariable("APPDATA") + "\\Ink Canvas\\";
- public App()
- {
+ public App() {
this.Startup += new StartupEventHandler(App_Startup);
this.DispatcherUnhandledException += App_DispatcherUnhandledException;
}
diff --git a/InkCanvasForClass/FodyWeavers.xml b/InkCanvasForClass/FodyWeavers.xml
deleted file mode 100644
index 1bf26da..0000000
--- a/InkCanvasForClass/FodyWeavers.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/InkCanvasForClass/InkCanvasForClass.csproj b/InkCanvasForClass/InkCanvasForClass.csproj
index ab33dfe..6b9b6b6 100644
--- a/InkCanvasForClass/InkCanvasForClass.csproj
+++ b/InkCanvasForClass/InkCanvasForClass.csproj
@@ -141,14 +141,6 @@
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/InkCanvasForClass/MainWindow_cs/MW_Eraser.cs b/InkCanvasForClass/MainWindow_cs/MW_Eraser.cs
index 3ffca75..2dd5e61 100644
--- a/InkCanvasForClass/MainWindow_cs/MW_Eraser.cs
+++ b/InkCanvasForClass/MainWindow_cs/MW_Eraser.cs
@@ -108,14 +108,20 @@ namespace Ink_Canvas {
StrokeHitEventArgs args) {
StrokeCollection eraseResult =
args.GetPointEraseResults();
- StrokeCollection strokesToReplace = new StrokeCollection();
- strokesToReplace.Add(args.HitStroke);
-
+ StrokeCollection strokesToReplace = new StrokeCollection {
+ args.HitStroke
+ };
+
// replace the old stroke with the new one.
- if (eraseResult.Count > 0) {
- inkCanvas.Strokes.Replace(strokesToReplace, eraseResult);
+ var filtered_2replace = strokesToReplace.Where(stroke => !stroke.ContainsPropertyData(IsLockGuid));
+ var filtered2Replace = filtered_2replace as Stroke[] ?? filtered_2replace.ToArray();
+ if (!filtered2Replace.Any()) return;
+ var filtered_result = eraseResult.Where(stroke=>!stroke.ContainsPropertyData(IsLockGuid));
+ var filteredResult = filtered_result as Stroke[] ?? filtered_result.ToArray();
+ if (filteredResult.Any()) {
+ inkCanvas.Strokes.Replace(new StrokeCollection(filtered2Replace), new StrokeCollection(filteredResult));
} else {
- inkCanvas.Strokes.Remove(strokesToReplace);
+ inkCanvas.Strokes.Remove(new StrokeCollection(filtered2Replace));
}
}
@@ -123,7 +129,10 @@ namespace Ink_Canvas {
if (!isUsingGeometryEraser) return;
if (isUsingStrokesEraser) {
- inkCanvas.Strokes.Remove(inkCanvas.Strokes.HitTest(pt));
+ var _filtered = inkCanvas.Strokes.HitTest(pt).Where(stroke => !stroke.ContainsPropertyData(IsLockGuid));
+ var filtered = _filtered as Stroke[] ?? _filtered.ToArray();
+ if (!filtered.Any()) return;
+ inkCanvas.Strokes.Remove(new StrokeCollection(filtered));
} else {
// draw eraser feedback
var ct = EraserOverlay_DrawingVisual.DrawingVisual.RenderOpen();
diff --git a/InkCanvasForClass/MainWindow_cs/MW_SelectionGestures.cs b/InkCanvasForClass/MainWindow_cs/MW_SelectionGestures.cs
index 2540c3e..b7708c7 100644
--- a/InkCanvasForClass/MainWindow_cs/MW_SelectionGestures.cs
+++ b/InkCanvasForClass/MainWindow_cs/MW_SelectionGestures.cs
@@ -438,7 +438,6 @@ namespace Ink_Canvas {
var bd = new Binding("Visibility");
bd.Source = GridInkCanvasSelectionCover;
BorderStrokeSelectionControl.SetBinding(Border.VisibilityProperty, bd);
- updateBorderStrokeSelectionControlLocation();
// unlock
isLockedStrokeSelectionHandle = false;
@@ -453,6 +452,10 @@ namespace Ink_Canvas {
// resize toast
StrokeSelectionSizeToast.Visibility = Visibility.Collapsed;
+
+ // update selection border size
+ UpdateStrokeSelectionBorder(true, inkCanvas.GetSelectionBounds());
+ updateBorderStrokeSelectionControlLocation();
}
private void StrokeSelectionBorderHandle_MouseMove(object sender, MouseEventArgs e) {