Fix activation handling in generic wxDataViewCtrl renderers.

Handling of activation in the generic implementation of standard renderers was
broken since r62589 which stopped calling their Activate() method. Restore it
by introducing a special WXOnActivate() replacing it (but clearly marked as
private and implementation-only) and calling it instead.

Closes #11460.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-06-20 17:43:30 +00:00
parent ed0a9eca57
commit 6218600646
3 changed files with 46 additions and 24 deletions

View File

@@ -100,10 +100,13 @@ public:
bool GetValue( wxVariant &value ) const;
bool Render( wxRect cell, wxDC *dc, int state );
bool Activate( wxRect cell, wxDataViewModel *model, const wxDataViewItem & item,
unsigned int col );
wxSize GetSize() const;
// Implementation only, don't use nor override
virtual void WXOnActivate(wxDataViewModel *model,
const wxVariant& valueOld,
const wxDataViewItem& item,
unsigned int col);
private:
bool m_toggle;
@@ -182,10 +185,12 @@ public:
virtual bool Render( wxRect cell, wxDC *dc, int state );
virtual wxSize GetSize() const;
virtual bool Activate( wxRect cell,
wxDataViewModel *model,
const wxDataViewItem& item,
unsigned int col );
// Implementation only, don't use nor override
virtual void WXOnActivate(wxDataViewModel *model,
const wxVariant& valueOld,
const wxDataViewItem& item,
unsigned int col);
private:
wxDateTime m_date;