Skip to content

Commit 1e07cf3

Browse files
Refresh both panes
1 parent 8db6cbe commit 1e07cf3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Files.App/Data/Contracts/IShellPanesPage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ public interface IShellPanesPage : IDisposable, INotifyPropertyChanged
6262
/// <summary>
6363
/// Updates the layout of open panes.
6464
/// </summary>
65-
public void UpdatePanesLayout();
65+
public void UpdatePanesLayout(bool inlcudeActive = true);
6666
}
6767
}

src/Files.App/Views/ShellPanesPage.xaml.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ public IShellPage? ActivePane
187187
if (ActivePane is not null)
188188
{
189189
ActivePane.IsCurrentInstance = IsCurrentInstance;
190-
UpdatePaneLayout(ActivePane);
191190
}
192191

193192
NotifyPropertyChanged(nameof(ActivePane));
@@ -360,13 +359,12 @@ public void FocusOtherPane()
360359
}
361360

362361
/// <inheritdoc/>
363-
public void UpdatePanesLayout()
362+
public void UpdatePanesLayout(bool inlcudeActive = true)
364363
{
365-
if (GetPane(0) is IShellPage leftPane)
364+
if (GetPane(0) is IShellPage leftPane && (inlcudeActive || leftPane != ActivePane))
366365
UpdatePaneLayout(leftPane);
367366

368-
369-
if (GetPane(1) is IShellPage rightPane)
367+
if (GetPane(1) is IShellPage rightPane && (inlcudeActive || rightPane != ActivePane))
370368
UpdatePaneLayout(rightPane);
371369
}
372370

src/Files.App/Views/Shells/BaseShellPage.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,8 @@ private void FolderSettings_LayoutPreferencesUpdateRequired(object sender, Layou
707707
LayoutPreferencesManager.SetLayoutPreferencesForPath(ShellViewModel.WorkingDirectory, e.LayoutPreference);
708708
if (e.IsAdaptiveLayoutUpdateRequired)
709709
AdaptiveLayoutHelpers.ApplyAdaptativeLayout(InstanceViewModel.FolderSettings, ShellViewModel.FilesAndFolders.ToList());
710+
711+
_PaneHolder.UpdatePanesLayout(false);
710712
}
711713

712714
protected virtual void ViewModel_WorkingDirectoryModified(object sender, WorkingDirectoryModifiedEventArgs e)

0 commit comments

Comments
 (0)