Skip to content

Commit 1deafe3

Browse files
Selection fix (#268)
1 parent cf1b4ec commit 1deafe3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Pixed.Common/Tools/SelectionManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ private async Task Erase()
154154
var pixels = _currentSelection.Pixels.Select(p => new Pixel(p.Position)).ToList();
155155
var frame = _applicationData.CurrentFrame;
156156

157-
var canvas = frame.GetCanvas();
158-
canvas.DrawPixelsOpaque(pixels, new Point(frame.Width, frame.Height));
159-
canvas.Dispose();
157+
var handle = frame.GetHandle();
158+
handle.SetPixels(pixels);
160159

160+
_applicationData.CurrentModel.ResetRecursive();
161161
Subjects.FrameModified.OnNext(frame);
162162
await _historyService.AddToHistory(_applicationData.CurrentModel);
163163
}

0 commit comments

Comments
 (0)