From 314c804d549ded8beecb082eae2fd20ed2a2e249 Mon Sep 17 00:00:00 2001 From: morkt Date: Sat, 2 Aug 2014 13:17:11 +0400 Subject: [PATCH] disable size display for directories. --- ViewModel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ViewModel.cs b/ViewModel.cs index 9aa17c6a..a79cafaa 100644 --- a/ViewModel.cs +++ b/ViewModel.cs @@ -71,7 +71,7 @@ namespace GARbro.GUI } foreach (var entry in Source) { - int prio = null == entry as SubDirEntry ? 0 : -1; + int prio = entry is SubDirEntry ? -1 : 0; Add (new EntryViewModel (entry, prio)); } } @@ -237,7 +237,7 @@ namespace GARbro.GUI public string Name { get; private set; } public string Type { get { return Source.Type; } } - public uint Size { get { return Source.Size; } } + public uint? Size { get { return IsDirectory ? null : (uint?)Source.Size; } } public int Priority { get; private set; } public bool IsDirectory { get { return Priority < 0; } } }