]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/propgridpagestate.cpp
fixing multiple extensions in one filter, turning off temporarily sheets code
[wxWidgets.git] / src / propgrid / propgridpagestate.cpp
index a0aeef77886171bd0ae252ae53e47d19de825566..0c6ed468cb47d85df44389f40772a138fa76300a 100644 (file)
@@ -255,7 +255,7 @@ void wxPropertyGridPageState::InitNonCatMode()
             wxPGProperty* parent = p->GetParent();
             if ( parent->IsCategory() || parent->IsRoot() )
             {
-                m_abcArray->AddChild2(p);
+                m_abcArray->DoAddChild(p);
                 p->m_parent = &m_regularArray;
             }
         }
@@ -268,7 +268,7 @@ void wxPropertyGridPageState::InitNonCatMode()
 
 void wxPropertyGridPageState::DoClear()
 {
-    if ( m_pPropGrid->GetState() == this  )
+    if ( m_pPropGrid && m_pPropGrid->GetState() == this  )
     {
         m_pPropGrid->ClearSelection(false);
     }
@@ -947,9 +947,7 @@ void wxPropertyGridPageState::CheckColumnWidths( int widthChange )
 
     //
     // Column to reduce, if needed. Take last one that exceeds minimum width.
-    // Except if auto splitter centering is used, in which case use widest.
     int reduceCol = -1;
-    int highestColWidth = 0;
 
 #ifdef __WXDEBUG__
     if ( debug )
@@ -967,18 +965,9 @@ void wxPropertyGridPageState::CheckColumnWidths( int widthChange )
         }
         else
         {
-            if ( pg->HasFlag(wxPG_SPLITTER_AUTO_CENTER) )
-            {
-                if ( m_colWidths[i] >= highestColWidth )
-                {
-                    highestColWidth = m_colWidths[i];
-                    reduceCol = i;
-                }
-            }
-            else
-            {
-                reduceCol = i;
-            }
+            // Always reduce the last column that is larger than minimum size
+            // (looks nicer, even with auto-centering enabled).
+            reduceCol = i;
         }
     }
 
@@ -1666,11 +1655,11 @@ wxPGProperty* wxPropertyGridPageState::DoInsert( wxPGProperty* parent, int index
         if ( m_abcArray && !property->IsCategory() &&
              (parentIsCategory || parentIsRoot) )
         {
-            m_abcArray->AddChild2( property, -1, false );
+            m_abcArray->DoAddChild( property, -1, false );
         }
 
         // Add to current mode.
-        parent->AddChild2( property, index, true );
+        parent->DoAddChild( property, index, true );
     }
     else
     {
@@ -1678,14 +1667,14 @@ wxPGProperty* wxPropertyGridPageState::DoInsert( wxPGProperty* parent, int index
 
         if ( parentIsCategory )
             // Parent is category.
-            parent->AddChild2( property, index, false );
+            parent->DoAddChild( property, index, false );
         else if ( parentIsRoot )
             // Parent is root.
-            m_regularArray.AddChild2( property, -1, false );
+            m_regularArray.DoAddChild( property, -1, false );
 
         // Add to current mode
         if ( !property->IsCategory() )
-            m_abcArray->AddChild2( property, index, true );
+            m_abcArray->DoAddChild( property, index, true );
     }
 
     // category stuff