From 2ba1a1597fde7e4c68e3a15c2ada7a26cdeb61b8 Mon Sep 17 00:00:00 2001 From: donho Date: Tue, 8 Jan 2008 17:36:34 +0000 Subject: [PATCH] [BUG_FIXED] Fix the crash issue of window dialog while clicking Sort button without selected item. Enhance Sort feature GUI part - Enable Sort button only after clicking on the column tab; Disable Sort button after sorting. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@100 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp | 11 ++++++++++- PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp index 65f278a7..0acc6843 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp +++ b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp @@ -167,7 +167,7 @@ END_WINDOW_MAP() RECT WindowsDlg::_lastKnownLocation; -WindowsDlg::WindowsDlg() : MyBaseClass(WindowsDlgMap) +WindowsDlg::WindowsDlg() : MyBaseClass(WindowsDlgMap), _isSorted(false) { _szMinButton = SIZEZERO; _szMinListCtrl = SIZEZERO; @@ -218,6 +218,8 @@ BOOL CALLBACK WindowsDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam case IDC_WINDOWS_SORT: doSortToTabs(); + _isSorted = false; + updateButtonState(); break; default : @@ -318,6 +320,8 @@ BOOL CALLBACK WindowsDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam for (i=0; i _idxMap; int _lastSort; + bool _isSorted; TiXmlNode *_dlgNode; private: