From 131d20a1888a849773f42cd854532ae8425287d7 Mon Sep 17 00:00:00 2001 From: Sup Yut Sum Date: Thu, 5 Nov 2015 00:34:44 +0800 Subject: [PATCH] Make sure a separator is added after Stash menu items Signed-off-by: Sup Yut Sum --- src/TortoiseProc/GitLogListBase.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/TortoiseProc/GitLogListBase.cpp b/src/TortoiseProc/GitLogListBase.cpp index 6c5c5b958..4740a84b2 100644 --- a/src/TortoiseProc/GitLogListBase.cpp +++ b/src/TortoiseProc/GitLogListBase.cpp @@ -1960,23 +1960,39 @@ void CGitLogListBase::OnContextMenu(CWnd* pWnd, CPoint point) } if (requiresSeparator) + { popup.AppendMenu(MF_SEPARATOR, NULL); + requiresSeparator = false; + } if (pSelLogEntry->m_CommitHash.IsEmpty() && !isMergeActive) { if(m_ContextMenuMask&GetContextMenuBit(ID_STASH_SAVE)) + { popup.AppendMenuIcon(ID_STASH_SAVE, IDS_MENUSTASHSAVE, IDI_COMMIT); + requiresSeparator = true; + } } if ((pSelLogEntry->m_CommitHash.IsEmpty() || isStash) && CTGitPath(g_Git.m_CurrentDir).HasStashDir()) { if (m_ContextMenuMask&GetContextMenuBit(ID_STASH_POP)) + { popup.AppendMenuIcon(ID_STASH_POP, IDS_MENUSTASHPOP, IDI_RELOCATE); + requiresSeparator = true; + } if (m_ContextMenuMask&GetContextMenuBit(ID_STASH_LIST)) + { popup.AppendMenuIcon(ID_STASH_LIST, IDS_MENUSTASHLIST, IDI_LOG); + requiresSeparator = true; + } + } + if (requiresSeparator) + { popup.AppendMenu(MF_SEPARATOR, NULL); + requiresSeparator = false; } if (pSelLogEntry->m_CommitHash.IsEmpty()) -- 2.11.4.GIT