Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix navigation window not updating when you resize it #509

Merged
merged 1 commit into from
Apr 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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