mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(DirectoryPosition): remember item as string.
This commit is contained in:
@@ -515,7 +515,7 @@ namespace GARbro.GUI
|
|||||||
vm.SetPosition (pos);
|
vm.SetPosition (pos);
|
||||||
ViewModel = vm;
|
ViewModel = vm;
|
||||||
if (null != pos.Item)
|
if (null != pos.Item)
|
||||||
lv_SelectItem (pos.Item.Name);
|
lv_SelectItem (pos.Item);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (Exception X)
|
catch (Exception X)
|
||||||
|
|||||||
@@ -281,12 +281,12 @@ namespace GARbro.GUI
|
|||||||
{
|
{
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
public string ArchivePath { get; set; }
|
public string ArchivePath { get; set; }
|
||||||
public EntryViewModel Item { get; set; }
|
public string Item { get; set; }
|
||||||
|
|
||||||
public DirectoryPosition (DirectoryViewModel vm, EntryViewModel item)
|
public DirectoryPosition (DirectoryViewModel vm, EntryViewModel item)
|
||||||
{
|
{
|
||||||
Path = vm.Path;
|
Path = vm.Path;
|
||||||
Item = item;
|
Item = item.Name;
|
||||||
if (vm.IsArchive)
|
if (vm.IsArchive)
|
||||||
ArchivePath = (vm as ArchiveViewModel).SubDir;
|
ArchivePath = (vm as ArchiveViewModel).SubDir;
|
||||||
else
|
else
|
||||||
@@ -297,8 +297,7 @@ namespace GARbro.GUI
|
|||||||
{
|
{
|
||||||
Path = System.IO.Path.GetDirectoryName (filename);
|
Path = System.IO.Path.GetDirectoryName (filename);
|
||||||
ArchivePath = "";
|
ArchivePath = "";
|
||||||
var entry = FormatCatalog.Instance.CreateEntry (filename);
|
Item = System.IO.Path.GetFileName (filename);
|
||||||
Item = new EntryViewModel (entry, 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user