]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/property.cpp
Alternate fix for #9954 (simple combobox assert) except on WinCE which probably shoul...
[wxWidgets.git] / src / propgrid / property.cpp
index afb45d3fa6ecaf05a09583b7f43cf26cc44b9906..5c789adc78596d73b081b058d88d608caec3675a 100644 (file)
@@ -1430,10 +1430,14 @@ void wxPGProperty::EnsureCells( unsigned int column )
         wxPropertyGrid* pg = GetGrid();
         wxPGCell defaultCell;
 
+        // Work around possible VC6 bug by using intermediate variables
+        const wxPGCell& propDefCell = pg->GetPropertyDefaultCell();
+        const wxPGCell& catDefCell = pg->GetCategoryDefaultCell();
+
         if ( !HasFlag(wxPG_PROP_CATEGORY) )
-            defaultCell = pg->GetPropertyDefaultCell();
+            defaultCell = propDefCell;
         else
-            defaultCell = pg->GetCategoryDefaultCell();
+            defaultCell = catDefCell;
 
         // TODO: Replace with resize() call
         unsigned int cellCountMax = column+1;
@@ -1511,7 +1515,7 @@ const wxPGCell& wxPGProperty::GetCell( unsigned int column ) const
     return pg->GetPropertyDefaultCell();
 }
 
-wxPGCell& wxPGProperty::GetCell( unsigned int column )
+wxPGCell& wxPGProperty::GetOrCreateCell( unsigned int column )
 {
     EnsureCells(column);
     return m_cells[column];
@@ -2125,7 +2129,7 @@ void wxPGProperty::RemoveChild( wxPGProperty* p )
     {
         if ( *it == p )
         {
-            m_children.erase(it);
+            children.erase(it);
             break;
         }
     }