diff --git a/include/wx/generic/collpaneg.h b/include/wx/generic/collpaneg.h index 27f1e87a75..7ea14bb26c 100644 --- a/include/wx/generic/collpaneg.h +++ b/include/wx/generic/collpaneg.h @@ -73,7 +73,7 @@ public: protected: // overridden methods - virtual wxSize DoGetBestSize() const wxOVERRIDE; + virtual wxSize DoGetBestClientSize() const wxOVERRIDE; int GetBorder() const; diff --git a/src/generic/collpaneg.cpp b/src/generic/collpaneg.cpp index 6a7a17af4d..37f8f90f22 100644 --- a/src/generic/collpaneg.cpp +++ b/src/generic/collpaneg.cpp @@ -112,7 +112,7 @@ wxGenericCollapsiblePane::~wxGenericCollapsiblePane() wxDELETE(m_sz); } -wxSize wxGenericCollapsiblePane::DoGetBestSize() const +wxSize wxGenericCollapsiblePane::DoGetBestClientSize() const { // NB: do not use GetSize() but rather GetMinSize() wxSize sz = m_sz->GetMinSize(); diff --git a/src/osx/dataview_osx.cpp b/src/osx/dataview_osx.cpp index 60e57b70f2..ee20e3bfaf 100644 --- a/src/osx/dataview_osx.cpp +++ b/src/osx/dataview_osx.cpp @@ -220,7 +220,15 @@ bool wxOSXDataViewModelNotifier::ValueChanged(wxDataViewItem const& item, unsign bool wxOSXDataViewModelNotifier::Cleared() { - return m_DataViewCtrlPtr->GetDataViewPeer()->Reload(); + // As when individual items are deleted, we must ensure that we don't touch + // the model item possibly being edited, as it's not valid any more. + m_DataViewCtrlPtr->SetDeleting(true); + + const bool rc = m_DataViewCtrlPtr->GetDataViewPeer()->Reload(); + + m_DataViewCtrlPtr->SetDeleting(false); + + return rc; } void wxOSXDataViewModelNotifier::Resort()