X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a632b93c32b8a186ba999d9de4355d052a4f29c1..fe104ff925ac53779d25280112401874089276b0:/src/common/headerctrlcmn.cpp diff --git a/src/common/headerctrlcmn.cpp b/src/common/headerctrlcmn.cpp index 270e124bd2..4e32625c6b 100644 --- a/src/common/headerctrlcmn.cpp +++ b/src/common/headerctrlcmn.cpp @@ -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) )