From 59a0c7c3d84dd70d6688aa3cdbc3fa8d295f4c6a Mon Sep 17 00:00:00 2001 From: Don HO Date: Mon, 7 Dec 2020 23:14:42 +0100 Subject: [PATCH] Fix menu check marks not being removed after closing the panels For both "Clipboard History" and "Character Panel" panels. Fix #9216 --- .../src/WinControls/AnsiCharPanel/ansiCharPanel.cpp | 7 +++++++ .../WinControls/ClipboardHistory/clipboardHistoryPanel.cpp | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.cpp b/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.cpp index 2844858d..19268e96 100644 --- a/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.cpp +++ b/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.cpp @@ -68,6 +68,13 @@ INT_PTR CALLBACK AnsiCharPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM { switch (((LPNMHDR)lParam)->code) { + case DMN_CLOSE: + { + ::SendMessage(_hParent, WM_COMMAND, IDM_EDIT_CHAR_PANEL, 0); + + return TRUE; + } + case NM_DBLCLK: { LPNMITEMACTIVATE lpnmitem = (LPNMITEMACTIVATE) lParam; diff --git a/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.cpp b/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.cpp index 9bd8d88a..9af9c216 100644 --- a/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.cpp +++ b/PowerEditor/src/WinControls/ClipboardHistory/clipboardHistoryPanel.cpp @@ -273,6 +273,13 @@ INT_PTR CALLBACK ClipboardHistoryPanel::run_dlgProc(UINT message, WPARAM wParam, } } break; + + case WM_NOTIFY: + { + if (((LPNMHDR)lParam)->code == DMN_CLOSE) + ::SendMessage(_hParent, WM_COMMAND, IDM_EDIT_CLIPBOARDHISTORY_PANEL, 0); + break; + } case WM_SIZE: {