]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/property.cpp
correct typo in one of the last changes
[wxWidgets.git] / src / propgrid / property.cpp
index 10ba288e6554b55a4e600673b7d572053f2c214f..addc80c0c20af351f4585859df050a027bfcde36 100644 (file)
@@ -149,8 +149,10 @@ int wxPGCellRenderer::PreDrawCell( wxDC& dc, const wxRect& rect, const wxPGCell&
         dc.SetTextForeground(cell.GetFgCol());
     }
 
         dc.SetTextForeground(cell.GetFgCol());
     }
 
-    // Draw Background
-    dc.DrawRectangle(rect);
+    // Draw Background, but only if not rendering in control
+    // (as control already has rendered correct background).
+    if ( !(flags & (Control|ChoicePopup)) )
+        dc.DrawRectangle(rect);
 
     const wxBitmap& bmp = cell.GetBitmap();
     if ( bmp.Ok() &&
 
     const wxBitmap& bmp = cell.GetBitmap();
     if ( bmp.Ok() &&
@@ -2274,6 +2276,17 @@ void wxPGProperty::Empty()
     m_children.clear();
 }
 
     m_children.clear();
 }
 
+void wxPGProperty::DeleteChildren()
+{
+    wxPropertyGridPageState* state = m_parentState;
+
+    while ( GetChildCount() )
+    {
+        wxPGProperty* child = Item(GetChildCount()-1);
+        state->DoDelete(child, true);
+    }
+}
+
 void wxPGProperty::ChildChanged( wxVariant& WXUNUSED(thisValue),
                                  int WXUNUSED(childIndex),
                                  wxVariant& WXUNUSED(childValue) ) const
 void wxPGProperty::ChildChanged( wxVariant& WXUNUSED(thisValue),
                                  int WXUNUSED(childIndex),
                                  wxVariant& WXUNUSED(childValue) ) const