]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/headerctrl.cpp
Move wxWebView-related definitions to webview_ie.cpp and fix them.
[wxWidgets.git] / src / msw / headerctrl.cpp
index 4983a1dcf45ade8f2c68fb72f7bebdc4ba2cbbf3..c6c4de551a21d909b96622a87aa4ae482118ba70 100644 (file)
@@ -561,7 +561,7 @@ bool wxHeaderCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
         // ASCII and Unicode versions of this message
         case HDN_BEGINTRACKA:
         case HDN_BEGINTRACKW:
-            // non-resizeable columns can't be resized no matter what, don't
+            // non-resizable columns can't be resized no matter what, don't
             // even generate any events for them
             if ( !GetColumn(idx).IsResizeable() )
             {
@@ -657,22 +657,24 @@ bool wxHeaderCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
         if ( order != -1 )
             event.SetNewOrder(order);
 
-        if ( GetEventHandler()->ProcessEvent(event) )
-        {
-            if ( event.IsAllowed() )
-                return true;    // skip default message handling below
+        const bool processed = GetEventHandler()->ProcessEvent(event);
 
-            // we need to veto the default handling of this message, don't
-            // return to execute the code in the "if veto" branch below
+        if ( processed && !event.IsAllowed() )
             veto = true;
-        }
-        else // not processed
+
+        if ( !veto )
         {
             // special post-processing for HDN_ENDDRAG: we need to update the
             // internal column indices array if this is allowed to go ahead as
             // the native control is going to reorder its columns now
             if ( evtType == wxEVT_COMMAND_HEADER_END_REORDER )
                 MoveColumnInOrderArray(m_colIndices, idx, order);
+
+            if ( processed )
+            {
+                // skip default processing below
+                return true;
+            }
         }
     }