From d08f7fda48323bdba014052cb59f08331d172136 Mon Sep 17 00:00:00 2001 From: Benjamin Popp Date: Fri, 5 Jul 2019 09:03:02 -0500 Subject: [PATCH] bugfix --- src/HexManiac.Core/ViewModels/ViewPort.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/HexManiac.Core/ViewModels/ViewPort.cs b/src/HexManiac.Core/ViewModels/ViewPort.cs index 9d3d92cd..fee38695 100644 --- a/src/HexManiac.Core/ViewModels/ViewPort.cs +++ b/src/HexManiac.Core/ViewModels/ViewPort.cs @@ -465,12 +465,16 @@ namespace HavenSoft.HexManiac.Core.ViewModels { moveSelectionStart.CanExecute = selection.MoveSelectionStart.CanExecute; moveSelectionStart.Execute = arg => { var direction = (Direction)arg; - MoveSelectionStartExecuted(arg, direction); + using (ModelCacheScope.CreateScope(Model)) { + MoveSelectionStartExecuted(arg, direction); + } }; selection.MoveSelectionStart.CanExecuteChanged += (sender, e) => moveSelectionStart.CanExecuteChanged.Invoke(this, e); moveSelectionEnd.CanExecute = selection.MoveSelectionEnd.CanExecute; moveSelectionEnd.Execute = arg => { - selection.MoveSelectionEnd.Execute(arg); + using (ModelCacheScope.CreateScope(Model)) { + selection.MoveSelectionEnd.Execute(arg); + } }; selection.MoveSelectionEnd.CanExecuteChanged += (sender, e) => moveSelectionEnd.CanExecuteChanged.Invoke(this, e);