Added Undo List to hold freshly undid drawn Lines

This commit is contained in:
Ano-sys
2025-03-23 00:25:58 +01:00
parent aaa2715243
commit 7a8e8a0bd3
+3 -1
View File
@@ -1,4 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.IO; using System.IO;
@@ -27,7 +28,8 @@ public class ViewModelBase : ObservableObject
public IRelayCommand<PointerReleasedEventArgs>? CanvasPointerReleasedCommand { get; set; } public IRelayCommand<PointerReleasedEventArgs>? CanvasPointerReleasedCommand { get; set; }
public ObservableCollection<DrawingPoints> DrawingPoints { get; set; } = new(); public ObservableCollection<DrawingPoints> DrawingPoints { get; set; } = new();
public DrawingPoints? DrawingPoint { get; set; } public DrawingPoints? DrawingPoint { get; set; }
protected List<DrawingPoints> UndoDrawingPoints = new();
protected bool IsDrawing { get; set; } protected bool IsDrawing { get; set; }
private string _selectedColor = "Black"; private string _selectedColor = "Black";