diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 42d77935d..fa937c26d 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -3563,13 +3563,15 @@ void Notepad_plus::command(int id) if (!_beforePostIt.isAlwaysOnTop) ::SendMessage(_hSelf, WM_COMMAND, IDM_VIEW_ALWAYSONTOP, 0); + + _beforePostIt.isPostIt = false; } else // PostIt { NppGUI & nppGUI = (NppGUI &)pNppParam->getNppGUI(); // get current status before switch to postIt - _beforePostIt.isPostIt = false; + _beforePostIt.isPostIt = true; _beforePostIt.isSizable = true; _beforePostIt.isAlwaysOnTop = ::GetMenuState(_mainMenuHandle, IDM_VIEW_ALWAYSONTOP, MF_BYCOMMAND) == MF_CHECKED; _beforePostIt.isMenuShown = ::SendMessage(_hSelf, NPPM_ISMENUHIDDEN, 0, 0) != TRUE; @@ -7934,7 +7936,10 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa } if (_isfullScreen) //closing, return to windowed mode - fullScreenToggle(); + fullScreenToggle(); + + if (_beforePostIt.isPostIt) + ::SendMessage(_hSelf, WM_COMMAND, IDM_VIEW_POSTIT, 0); if (_configStyleDlg.isCreated() && ::IsWindowVisible(_configStyleDlg.getHSelf())) _configStyleDlg.restoreGlobalOverrideValues(); diff --git a/PowerEditor/src/menuCmdID.h b/PowerEditor/src/menuCmdID.h index 470343705..2b4e652f8 100644 --- a/PowerEditor/src/menuCmdID.h +++ b/PowerEditor/src/menuCmdID.h @@ -119,7 +119,7 @@ #define IDM_VIEW_LOCKTABBAR (IDM_VIEW + 6) #define IDM_VIEW_DRAWTABBAR_TOPBAR (IDM_VIEW + 7) #define IDM_VIEW_DRAWTABBAR_INACIVETAB (IDM_VIEW + 8) - //#define IDM_VIEW_STATUSBAR (IDM_VIEW + 9) + #define IDM_VIEW_POSTIT (IDM_VIEW + 9) #define IDM_VIEW_TOGGLE_FOLDALL (IDM_VIEW + 10) #define IDM_VIEW_USER_DLG (IDM_VIEW + 11) #define IDM_VIEW_LINENUMBER (IDM_VIEW + 12) @@ -155,8 +155,7 @@ #define IDM_VIEW_HIDELINES (IDM_VIEW + 42) #define IDM_VIEW_DRAWTABBAR_VERTICAL (IDM_VIEW + 43) #define IDM_VIEW_DRAWTABBAR_MULTILINE (IDM_VIEW + 44) - //#define IDM_VIEW_HIDEMENU (IDM_VIEW + 45) -#define IDM_VIEW_POSTIT (IDM_VIEW + 46) + #define IDM_VIEW_FOLD (IDM_VIEW + 50) #define IDM_VIEW_FOLD_1 (IDM_VIEW_FOLD + 1)