From e2f19f30ca9f72dbfc708f21ba3b33d1f2e8ab45 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Thu, 16 Apr 2015 00:34:23 +0200 Subject: [PATCH] [BUG_FIXED] Fix "Restore last closed file" (Ctrl+Shift+T) display bug. --- PowerEditor/src/lastRecentFileList.cpp | 1 - PowerEditor/src/menuCmdID.h | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/PowerEditor/src/lastRecentFileList.cpp b/PowerEditor/src/lastRecentFileList.cpp index a2f24a86d..2e7dc670d 100644 --- a/PowerEditor/src/lastRecentFileList.cpp +++ b/PowerEditor/src/lastRecentFileList.cpp @@ -59,7 +59,6 @@ void LastRecentFileList::switchMode() //Remove all menu items ::RemoveMenu(_hMenu, IDM_FILE_RESTORELASTCLOSEDFILE, MF_BYCOMMAND); ::RemoveMenu(_hMenu, IDM_OPEN_ALL_RECENT_FILE, MF_BYCOMMAND); - ::RemoveMenu(_hMenu, IDM_FILE_RESTORELASTCLOSEDFILE, MF_BYCOMMAND); ::RemoveMenu(_hMenu, IDM_CLEAN_RECENT_FILE_LIST, MF_BYCOMMAND); for(int i = 0; i < _size; ++i) diff --git a/PowerEditor/src/menuCmdID.h b/PowerEditor/src/menuCmdID.h index 9886b6d22..4e6594611 100644 --- a/PowerEditor/src/menuCmdID.h +++ b/PowerEditor/src/menuCmdID.h @@ -54,13 +54,13 @@ #define IDM_FILE_CLOSEALL_TORIGHT (IDM_FILE + 18) #define IDM_FILE_OPEN_FOLDER (IDM_FILE + 19) #define IDM_FILE_OPEN_CMD (IDM_FILE + 20) - + #define IDM_FILE_RESTORELASTCLOSEDFILE (IDM_FILE + 21) // IMPORTANT: If list above is modified, you have to change the following values: // To be updated if new menu item(s) is (are) added in menu "File" - #define IDM_FILEMENU_LASTONE IDM_FILE_OPEN_CMD -// Byond of the last one - #define IDM_FILE_RESTORELASTCLOSEDFILE (IDM_FILE + 30) + #define IDM_FILEMENU_LASTONE IDM_FILE_RESTORELASTCLOSEDFILE + + // 0 based position of command "Exit" including the bars in the file menu // and without counting "Recent files history" items