From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Mon, 8 Dec 2008 16:31:44 +0000 (+0000)
Subject: don't take EVT_HEADER_END_DRAG into account if it indicates the the drag was cancelled
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/afdf99e13aa2eeff57a9fc01014eabde7eb9421e

don't take EVT_HEADER_END_DRAG into account if it indicates the the drag was cancelled

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp
index 3091a3adca..af1c5ee275 100644
--- a/src/generic/datavgen.cpp
+++ b/src/generic/datavgen.cpp
@@ -154,9 +154,12 @@ private:
 
     void OnEndDrag(wxHeaderCtrlEvent& event)
     {
-        const unsigned col = event.GetColumn();
-        GetColumn(col).SetWidth(event.GetWidth());
-        GetOwner()->OnColumnChange(col);
+        if ( !event.IsCancelled() )
+        {
+            const unsigned col = event.GetColumn();
+            GetColumn(col).SetWidth(event.GetWidth());
+            GetOwner()->OnColumnChange(col);
+        }
     }
 
     DECLARE_EVENT_TABLE()