X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80ce465c64d6f250e26cd69e62671a189302e897..c9ed413ab4f5673ffff00198dc6ce1397398bda4:/src/osx/carbon/dataview.cpp diff --git a/src/osx/carbon/dataview.cpp b/src/osx/carbon/dataview.cpp index 48cb63956e..a981920486 100644 --- a/src/osx/carbon/dataview.cpp +++ b/src/osx/carbon/dataview.cpp @@ -2468,16 +2468,18 @@ wxDataViewColumn::wxDataViewColumn(const wxString& title, wxDataViewRenderer* re :wxDataViewColumnBase(renderer, model_column), m_NativeDataPtr(new wxDataViewColumnNativeData()), m_title(title) { InitCommon(width, align, flags); - if ((renderer != NULL) && (renderer->GetAlignment() == wxDVR_DEFAULT_ALIGNMENT)) - renderer->SetAlignment(align); + if ((renderer != NULL) && !renderer->IsCustomRenderer() && + (renderer->GetAlignment() == wxDVR_DEFAULT_ALIGNMENT)) + renderer->SetAlignment(align); } wxDataViewColumn::wxDataViewColumn(const wxBitmap& bitmap, wxDataViewRenderer* renderer, unsigned int model_column, int width, wxAlignment align, int flags) :wxDataViewColumnBase(bitmap, renderer, model_column), m_NativeDataPtr(new wxDataViewColumnNativeData()) { InitCommon(width, align, flags); - if ((renderer != NULL) && (renderer->GetAlignment() == wxDVR_DEFAULT_ALIGNMENT)) - renderer->SetAlignment(align); + if ((renderer != NULL) && !renderer->IsCustomRenderer() && + (renderer->GetAlignment() == wxDVR_DEFAULT_ALIGNMENT)) + renderer->SetAlignment(align); } wxDataViewColumn::~wxDataViewColumn() @@ -2746,6 +2748,16 @@ void wxDataViewColumn::SetWidth(int width) { wxDataViewCtrl* dataViewCtrlPtr(GetOwner()); + switch ( width ) + { + case wxCOL_WIDTH_AUTOSIZE: + // not implemented, fall through + case wxCOL_WIDTH_DEFAULT: + width = wxDVC_DEFAULT_WIDTH; + break; + default: + break; + } if ((width >= m_minWidth) && (width <= m_maxWidth)) {