diff --git a/include/wx/dvrenderers.h b/include/wx/dvrenderers.h index 3f623cf6a6..775bc1a2d8 100644 --- a/include/wx/dvrenderers.h +++ b/include/wx/dvrenderers.h @@ -163,9 +163,7 @@ public: virtual bool IsCustomRenderer() const { return false; } -protected: - // Called from {Cancel,Finish}Editing() to cleanup m_editorCtrl - void DestroyEditControl(); + // Implementation only from now on. // Return the alignment of this renderer if it's specified (i.e. has value // different from the default wxDVR_DEFAULT_ALIGNMENT) or the alignment of @@ -176,6 +174,10 @@ protected: // wxDVR_DEFAULT_ALIGNMENT. int GetEffectiveAlignment() const; +protected: + // Called from {Cancel,Finish}Editing() to cleanup m_editorCtrl + void DestroyEditControl(); + wxString m_variantType; wxDataViewColumn *m_owner; wxWeakRef m_editorCtrl; diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 05f1b3992e..afba6111df 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -4412,9 +4412,7 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event ) // see #12270. // adjust the rectangle ourselves to account for the alignment - int align = cell->GetAlignment(); - if ( align == wxDVR_DEFAULT_ALIGNMENT ) - align = wxALIGN_CENTRE; + const int align = cell->GetEffectiveAlignment(); wxRect rectItem = cell_rect; const wxSize size = cell->GetSize();