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

@@ -82,7 +82,7 @@ class WXDLLIMPEXP_ADV wxDataViewListModelNotifier: public wxObject
{
public:
wxDataViewListModelNotifier() { }
virtual ~wxDataViewListModelNotifier() { }
virtual ~wxDataViewListModelNotifier() { m_owner = NULL; }
virtual bool RowAppended() = 0;
virtual bool RowPrepended() = 0;
@@ -92,8 +92,6 @@ public:
virtual bool ValueChanged( unsigned int col, unsigned int row ) = 0;
virtual bool RowsReordered( unsigned int *new_order ) = 0;
virtual bool Cleared() = 0;
virtual bool Freed()
{ m_owner = NULL; return true; }
void SetOwner( wxDataViewListModel *owner ) { m_owner = owner; }
wxDataViewListModel *GetOwner() { return m_owner; }
@@ -223,6 +221,8 @@ public:
bool ChildCleared();
virtual void Resort();
void DetachChild();
private:
bool m_ascending;