X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a632b93c32b8a186ba999d9de4355d052a4f29c1..beee38cb41aa2ce4fbe9052bf4f70e1be184b553:/src/common/headerctrlcmn.cpp diff --git a/src/common/headerctrlcmn.cpp b/src/common/headerctrlcmn.cpp index 270e124bd2..be858a6848 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) ) @@ -436,7 +443,7 @@ void wxHeaderCtrlSimple::DoShowSortIndicator(unsigned int idx, bool ascending) { RemoveSortIndicator(); - m_cols[idx].SetAsSortKey(ascending); + m_cols[idx].SetSortOrder(ascending); m_sortKey = idx; UpdateColumn(idx);