mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 15:44:00 +08:00
(OpenDirectoryEntry): create empty view if TryCreateViewModel failed.
This commit is contained in:
parent
c93d8c3076
commit
1e4dfd2417
@ -830,14 +830,20 @@ namespace GARbro.GUI
|
|||||||
int old_fs_count = VFS.Count;
|
int old_fs_count = VFS.Count;
|
||||||
vm = TryCreateViewModel (new_dir);
|
vm = TryCreateViewModel (new_dir);
|
||||||
if (null == vm)
|
if (null == vm)
|
||||||
|
{
|
||||||
|
if (VFS.Count == old_fs_count)
|
||||||
return;
|
return;
|
||||||
|
vm = new DirectoryViewModel (VFS.FullPath, new Entry[0], VFS.IsVirtual);
|
||||||
PushViewModel (vm);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (VFS.Count > old_fs_count && null != VFS.CurrentArchive)
|
if (VFS.Count > old_fs_count && null != VFS.CurrentArchive)
|
||||||
SetStatusText (string.Format ("{0}: {1}", VFS.CurrentArchive.Description,
|
SetStatusText (string.Format ("{0}: {1}", VFS.CurrentArchive.Description,
|
||||||
Localization.Format ("MsgFiles", VFS.CurrentArchive.Dir.Count())));
|
Localization.Format ("MsgFiles", VFS.CurrentArchive.Dir.Count())));
|
||||||
else
|
else
|
||||||
SetStatusText ("");
|
SetStatusText ("");
|
||||||
|
}
|
||||||
|
PushViewModel (vm);
|
||||||
|
|
||||||
if (".." == entry.Name)
|
if (".." == entry.Name)
|
||||||
lv_SelectItem (Path.GetFileName (old_dir));
|
lv_SelectItem (Path.GetFileName (old_dir));
|
||||||
|
Loading…
Reference in New Issue
Block a user