]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/propgridpagestate.cpp
Use a " " (space) for the menu item if an empty string is used for an item in a wxCho...
[wxWidgets.git] / src / propgrid / propgridpagestate.cpp
index 74b1adbe1f39011e38b39ebddf25bd3e891e90c1..8ec1e3a1a5697a40aaa1eda3a3c24fba89107d68 100644 (file)
@@ -1398,42 +1398,6 @@ bool wxPropertyGridPageState::DoHideProperty( wxPGProperty* p, bool hide, int fl
     return true;
 }
 
-// -----------------------------------------------------------------------
-
-bool wxPropertyGridPageState::DoEnableProperty( wxPGProperty* p, bool enable )
-{
-    if ( p )
-    {
-        if ( enable )
-        {
-            if ( !(p->m_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
 // -----------------------------------------------------------------------
@@ -1970,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).