From b6e965ed3e34419e1ed4726620e4652d6b296b4f Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sun, 2 Aug 2015 13:12:12 +0200 Subject: [PATCH] Show the 'normal' overlay if not even the 'modified' overlay is available Based on TortoiseSVN revision 26643. Signed-off-by: Sven Strickroth --- src/TortoiseShell/IconOverlay.cpp | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/TortoiseShell/IconOverlay.cpp b/src/TortoiseShell/IconOverlay.cpp index 42caa596f..e1ecc0fbd 100644 --- a/src/TortoiseShell/IconOverlay.cpp +++ b/src/TortoiseShell/IconOverlay.cpp @@ -303,7 +303,9 @@ STDMETHODIMP CShellExt::IsMemberOf_Wrap(LPCWSTR pwszPath, DWORD /*dwAttrib*/) { // note: we can show other overlays if due to lack of enough free overlay // slots some of our overlays aren't loaded. But we assume that - // at least the 'normal' and 'modified' overlay are available. + // at least the 'normal' overlay is available. + // if the 'modified' overlay isn't available, we show the 'normal' overlay, + // but in this case the overlays don't really provide anything useful anymore. case git_wc_status_none: return S_FALSE; case git_wc_status_unversioned: @@ -377,13 +379,26 @@ STDMETHODIMP CShellExt::IsMemberOf_Wrap(LPCWSTR pwszPath, DWORD /*dwAttrib*/) } case git_wc_status_replaced: case git_wc_status_modified: - if (m_State == FileStateModified) + if (g_modifiedovlloaded) { - g_filepath.clear(); - return S_OK; + if (m_State == FileStateModified) + { + g_filepath.clear(); + return S_OK; + } + else + return S_FALSE; } else - return S_FALSE; + { + if (m_State == FileStateVersioned) + { + g_filepath.clear(); + return S_OK; + } + else + return S_FALSE; + } case git_wc_status_merged: if (m_State == FileStateReadOnly) { -- 2.11.4.GIT