]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/headerctrlcmn.cpp
fixing osx_carbon
[wxWidgets.git] / src / common / headerctrlcmn.cpp
index 270e124bd2e95787de7be72e27ba590e63765422..4e32625c6b536cda52afe7633119e1ead95fddf4 100644 (file)
@@ -114,8 +114,15 @@ void wxHeaderCtrlBase::SetColumnCount(unsigned int count)
 void wxHeaderCtrlBase::OnSeparatorDClick(wxHeaderCtrlEvent& event)
 {
     const unsigned col = event.GetColumn();
+    const wxHeaderColumn& column = GetColumn(col);
 
-    int w = wxWindowBase::GetTextExtent(GetColumn(col).GetTitle()).x;
+    if ( !column.IsResizeable() )
+    {
+        event.Skip();
+        return;
+    }
+
+    int w = wxWindowBase::GetTextExtent(column.GetTitle()).x;
     w += 4*GetCharWidth(); // add some arbitrary margins around text
 
     if ( !UpdateColumnWidthToFit(col, w) )