Fix wrong item is selected after moving up a container

This commit is contained in:
2023-08-19 20:48:50 +02:00
parent c9a92f4923
commit 9c5bca144f

View File

@@ -124,8 +124,9 @@ public class Tab : ITab
{ {
var itemSelectingContext = new LastItemSelectingContext(CurrentLocation.Value); var itemSelectingContext = new LastItemSelectingContext(CurrentLocation.Value);
var lastItemSelectingContext = _lastItemSelectingContext; var lastItemSelectingContext = _lastItemSelectingContext;
_lastItemSelectingContext = itemSelectingContext;
if (items == null || items.Count == 0) return Task.FromResult<AbsolutePath?>(null); if (items == null || items.Count == 0) return Task.FromResult<AbsolutePath?>(null);
_lastItemSelectingContext = itemSelectingContext;
if (selected != null) if (selected != null)
{ {
if (items.Any(i => i.FullName == selected.Path)) if (items.Any(i => i.FullName == selected.Path))