diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 3e0af96c..65f0edb6 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -515,7 +515,7 @@ namespace GARbro.GUI vm.SetPosition (pos); ViewModel = vm; if (null != pos.Item) - lv_SelectItem (pos.Item.Name); + lv_SelectItem (pos.Item); return true; } catch (Exception X) diff --git a/ViewModel.cs b/ViewModel.cs index 314c2736..7ca8eb5f 100644 --- a/ViewModel.cs +++ b/ViewModel.cs @@ -281,12 +281,12 @@ namespace GARbro.GUI { public string Path { get; set; } public string ArchivePath { get; set; } - public EntryViewModel Item { get; set; } + public string Item { get; set; } public DirectoryPosition (DirectoryViewModel vm, EntryViewModel item) { Path = vm.Path; - Item = item; + Item = item.Name; if (vm.IsArchive) ArchivePath = (vm as ArchiveViewModel).SubDir; else @@ -297,8 +297,7 @@ namespace GARbro.GUI { Path = System.IO.Path.GetDirectoryName (filename); ArchivePath = ""; - var entry = FormatCatalog.Instance.CreateEntry (filename); - Item = new EntryViewModel (entry, 0); + Item = System.IO.Path.GetFileName (filename); } } }