Use child's listmodelnotifier's destructor (by overloading

it) to get informed about the destruction of the child
   model in a sorted model. Removed Freed() method used for
   that so far.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-04-24 18:00:14 +00:00
parent c2ac2afd09
commit f7ed8c899f
3 changed files with 19 additions and 21 deletions

View File

@@ -778,6 +778,7 @@ class wxGtkDataViewListModelNotifier: public wxDataViewListModelNotifier
{
public:
wxGtkDataViewListModelNotifier( GtkWxListStore* gtk_store, wxDataViewListModel *wx_model );
~wxGtkDataViewListModelNotifier();
virtual bool RowAppended();
virtual bool RowPrepended();
@@ -788,13 +789,6 @@ public:
virtual bool RowsReordered( unsigned int *new_order );
virtual bool Cleared();
virtual bool Freed()
{
m_wx_model = NULL;
m_gtk_store = NULL;
return wxDataViewListModelNotifier::Freed();
}
GtkWxListStore *m_gtk_store;
wxDataViewListModel *m_wx_model;
};
@@ -810,6 +804,12 @@ wxGtkDataViewListModelNotifier::wxGtkDataViewListModelNotifier(
m_wx_model = wx_model;
}
wxGtkDataViewListModelNotifier::~wxGtkDataViewListModelNotifier()
{
m_wx_model = NULL;
m_gtk_store = NULL;
}
bool wxGtkDataViewListModelNotifier::RowAppended()
{
unsigned int pos = m_wx_model->GetRowCount()-1;