]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/datavgen.cpp
Forward port new wxRenderer methods in 2.8 to trunk.
[wxWidgets.git] / src / generic / datavgen.cpp
index b5f7c321e794351f527d20f94e56949ce6750a93..21483c4910e6df6750e5285703171c154b4da885 100644 (file)
@@ -91,7 +91,7 @@ public:
 protected:
     // implement/override wxHeaderCtrl functions by forwarding them to the main
     // control
-    virtual wxHeaderColumnBase& GetColumn(unsigned int idx)
+    virtual wxHeaderColumn& GetColumn(unsigned int idx)
     {
         return *(GetOwner()->GetColumn(idx));
     }
@@ -176,12 +176,11 @@ private:
 
     void OnEndResize(wxHeaderCtrlEvent& event)
     {
-        if ( !event.IsCancelled() )
-        {
-            const unsigned col = event.GetColumn();
-            GetColumn(col).SetWidth(event.GetWidth());
-            GetOwner()->OnColumnChange(col);
-        }
+        wxDataViewCtrl * const owner = GetOwner();
+
+        const unsigned col = event.GetColumn();
+        owner->GetColumn(col)->SetWidth(event.GetWidth());
+        GetOwner()->OnColumnChange(col);
     }
 
     void OnEndReorder(wxHeaderCtrlEvent& event)