X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ace9bc269743dba4a1125f32778c7eab58b388b1..dd71bfb9921430755a885117cc6c9843c62dafda:/src/propgrid/property.cpp?ds=sidebyside diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index 93067a10f6..e759aa5d72 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -6,7 +6,7 @@ // Created: 2008-08-23 // RCS-ID: $Id$ // Copyright: (c) Jaakko Salli -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx/wx.h". @@ -692,12 +692,7 @@ wxPropertyGrid* wxPGProperty::GetGrid() const int wxPGProperty::Index( const wxPGProperty* p ) const { - for ( unsigned int i = 0; iEnableProperty(this, enable); + else + DoEnable(enable); +} + +void wxPGProperty::DoEnable( bool enable ) +{ + if ( enable ) + ClearFlag(wxPG_PROP_DISABLED); + else + SetFlag(wxPG_PROP_DISABLED); + + // Apply same to sub-properties as well + unsigned int i; + for ( i = 0; i < GetChildCount(); i++ ) + Item(i)->DoEnable( enable ); +} + void wxPGProperty::EnsureCells( unsigned int column ) { if ( column >= m_cells.size() )