X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3ded4b22fe0fa21b6bada0beede43cb4d06b233f..f2a5052baa9f3cf87a5198e445021b8a6a1be134:/src/propgrid/propgridpagestate.cpp diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index 1279370d12..8ec1e3a1a5 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -6,7 +6,7 @@ // Created: 2008-08-24 // RCS-ID: $Id$ // Copyright: (c) Jaakko Salli -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx/wx.h". @@ -1299,13 +1299,8 @@ bool wxPropertyGridPageState::DoSetPropertyValueWxObjectPtr( wxPGProperty* p, wx bool wxPropertyGridPageState::DoIsPropertySelected( wxPGProperty* prop ) const { - const wxArrayPGProperty& selection = m_selection; - - for ( unsigned int i=0; im_flags & wxPG_PROP_DISABLED) ) - return false; - - // Enabling - - p->m_flags &= ~(wxPG_PROP_DISABLED); - } - else - { - if ( p->m_flags & wxPG_PROP_DISABLED ) - return false; - - // Disabling - - p->m_flags |= wxPG_PROP_DISABLED; - - } - - // Apply same to sub-properties as well - unsigned int i; - for ( i = 0; i < p->GetChildCount(); i++ ) - DoEnableProperty( p->Item(i), enable ); - - return true; - } - return false; -} - // ----------------------------------------------------------------------- // wxPropertyGridPageState wxVariant related routines // ----------------------------------------------------------------------- @@ -1975,6 +1934,8 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete ) // We can actually delete it now if ( doDelete ) delete item; + else + item->OnDetached(this, pg); m_itemsAdded = 1; // Not a logical assignment (but required nonetheless).