Skip to content

Commit

Permalink
Fix navigation window not updating when you resize it
Browse files Browse the repository at this point in the history
  • Loading branch information
Equbuxu committed Apr 8, 2023
1 parent 9a7d9a8 commit 64b315f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/PixiEditor/Models/DocumentModels/ActionAccumulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using PixiEditor.ChangeableDocument.ChangeInfos;
using PixiEditor.DrawingApi.Core.Numerics;
using PixiEditor.Helpers;
using PixiEditor.Models.DocumentPassthroughActions;
using PixiEditor.Models.Rendering;
using PixiEditor.Models.Rendering.RenderInfos;
using PixiEditor.ViewModels.SubViewModels.Document;
Expand Down Expand Up @@ -75,6 +76,7 @@ private async void TryExecuteAccumulatedActions()
// update viewmodels based on changes
List<IChangeInfo> optimizedChanges = ChangeInfoListOptimizer.Optimize(changes);
bool undoBoundaryPassed = toExecute.Any(static action => action is ChangeBoundary_Action or Redo_Action or Undo_Action);
bool viewportRefreshRequest = toExecute.Any(static action => action is RefreshViewport_PassthroughAction);
foreach (IChangeInfo info in optimizedChanges)
{
internals.Updater.ApplyChangeFromChangeInfo(info);
Expand Down Expand Up @@ -104,7 +106,7 @@ private async void TryExecuteAccumulatedActions()
// update the contents of the bitmaps
var affectedAreas = new AffectedAreasGatherer(internals.Tracker, optimizedChanges);
List<IRenderInfo> renderResult = new();
renderResult.AddRange(await canvasUpdater.UpdateGatheredChunks(affectedAreas, undoBoundaryPassed));
renderResult.AddRange(await canvasUpdater.UpdateGatheredChunks(affectedAreas, undoBoundaryPassed || viewportRefreshRequest));
renderResult.AddRange(await previewUpdater.UpdateGatheredChunks(affectedAreas, undoBoundaryPassed));

// lock bitmaps
Expand Down

0 comments on commit 64b315f

Please sign in to comment.