Create wxAccessible object on demand in wxDVC
Create wxAccessible objects only in response to calls to GetOrCreateAccessible() to save resources.
This commit is contained in:
@@ -2570,10 +2570,6 @@ bool wxDataViewTreeCtrl::Create( wxWindow *parent, wxWindowID id,
|
||||
0 // not resizable
|
||||
);
|
||||
|
||||
#if wxUSE_ACCESSIBILITY
|
||||
SetAccessible(new wxDataViewTreeCtrlAccessible(this));
|
||||
#endif // wxUSE_ACCESSIBILITY
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2743,6 +2739,13 @@ void wxDataViewTreeCtrl::OnSize( wxSizeEvent &event )
|
||||
event.Skip( true );
|
||||
}
|
||||
|
||||
#if wxUSE_ACCESSIBILITY
|
||||
wxAccessible* wxDataViewTreeCtrl::CreateAccessible()
|
||||
{
|
||||
return new wxDataViewTreeCtrlAccessible(this);
|
||||
}
|
||||
#endif // wxUSE_ACCESSIBILITY
|
||||
|
||||
#if wxUSE_ACCESSIBILITY
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxDataViewTreeCtrlAccessible
|
||||
|
||||
Reference in New Issue
Block a user