(DirectoryPosition): remember item as string.

This commit is contained in:
morkt 2014-07-27 06:06:50 +04:00
parent 61bd342f54
commit 5253f8c776
2 changed files with 4 additions and 5 deletions

View File

@ -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)

View File

@ -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);
}
}
}