From 7dcf0d19387a747188294ff2fffb0b80ccf1c8f3 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Mon, 23 Oct 2017 17:00:22 +0200 Subject: [PATCH] Fixed issue #3096: Duplicate 'Save as...' context menu items appear when closing and opening 'View Patch' window Signed-off-by: Sven Strickroth --- src/Changelog.txt | 1 + src/TortoiseProc/PatchViewDlg.cpp | 1 + src/Utils/MiscUI/SciEdit.h | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Changelog.txt b/src/Changelog.txt index 480452f95..df495ee25 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -21,6 +21,7 @@ Released: unreleased * Fixed issue #3084: Improve info message for merge-doc.js and drop broken URL * Fixed issue #3085: merge-doc.js: Word 2007 does not make a three-way comparison and the documents are shown in wrong order * Fixed issue #3086: merge-doc.js: Merge document in word >=2010 leaves three open windows + * Fixed issue #3096: Duplicate 'Save as...' context menu items appear when closing and opening 'View Patch' window = Release 2.5.0 = Released: 2017-07-23 diff --git a/src/TortoiseProc/PatchViewDlg.cpp b/src/TortoiseProc/PatchViewDlg.cpp index d79da62e9..f257b3a43 100644 --- a/src/TortoiseProc/PatchViewDlg.cpp +++ b/src/TortoiseProc/PatchViewDlg.cpp @@ -256,6 +256,7 @@ void CPatchViewDlg::OnDestroy() CRect rect; GetWindowRect(&rect); CRegStdDWORD(L"Software\\TortoiseGit\\TortoiseProc\\PatchDlgWidth") = rect.Width(); + m_ctrlPatchView.ClearContextMenuHandlers(); } // CSciEditContextMenuInterface diff --git a/src/Utils/MiscUI/SciEdit.h b/src/Utils/MiscUI/SciEdit.h index caaff25e9..afccc443c 100644 --- a/src/Utils/MiscUI/SciEdit.h +++ b/src/Utils/MiscUI/SciEdit.h @@ -1,6 +1,6 @@ // TortoiseGit - a Windows shell extension for easy version control -// Copyright (C) 2009-2016 - TortoiseGit +// Copyright (C) 2009-2017 - TortoiseGit // Copyright (C) 2003-2008, 2013 - TortoiseSVN // This program is free software; you can redistribute it and/or @@ -126,6 +126,7 @@ public: CString GetWordUnderCursor(bool bSelectWord = false); void RegisterContextMenuHandler(CSciEditContextMenuInterface * object) {m_arContextHandlers.Add(object);} + void ClearContextMenuHandlers() { m_arContextHandlers.RemoveAll(); } CStringA StringForControl(const CString& text); CString StringFromControl(const CStringA& text); -- 2.11.4.GIT