]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied [ 746201 ] wxGrid row/col change not updated
authorJulian Smart <julian@anthemion.co.uk>
Sun, 1 Jun 2003 12:55:59 +0000 (12:55 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 1 Jun 2003 12:55:59 +0000 (12:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/grid.cpp

index 78a7a2612e6e16cdb3b6571f7fb54d635e8795ee..511bed5c935016481e9c6984b8504de19d674d7f 100644 (file)
@@ -5769,7 +5769,9 @@ bool wxGrid::InsertRows( int pos, int numRows, bool WXUNUSED(updateLabels) )
         if (IsCellEditControlEnabled())
             DisableCellEditControl();
 
-        return m_table->InsertRows( pos, numRows );
+        bool done = m_table->InsertRows( pos, numRows );
+        m_numRows = m_table->GetNumberRows();
+        return done;
 
         // the table will have sent the results of the insert row
         // operation to this view object as a grid table message
@@ -5788,9 +5790,15 @@ bool wxGrid::AppendRows( int numRows, bool WXUNUSED(updateLabels) )
         return FALSE;
     }
 
-    return ( m_table && m_table->AppendRows( numRows ) );
-    // the table will have sent the results of the append row
-    // operation to this view object as a grid table message
+    if ( m_table )
+    {
+        bool done = m_table && m_table->AppendRows( numRows );
+        m_numRows = m_table->GetNumberRows();
+        return done;
+        // the table will have sent the results of the append row
+        // operation to this view object as a grid table message
+    }
+    return FALSE;
 }
 
 
@@ -5809,7 +5817,9 @@ bool wxGrid::DeleteRows( int pos, int numRows, bool WXUNUSED(updateLabels) )
         if (IsCellEditControlEnabled())
             DisableCellEditControl();
 
-        return (m_table->DeleteRows( pos, numRows ));
+        bool done = m_table->DeleteRows( pos, numRows );
+        m_numRows = m_table->GetNumberRows();
+        return done;
         // the table will have sent the results of the delete row
         // operation to this view object as a grid table message
     }
@@ -5832,7 +5842,9 @@ bool wxGrid::InsertCols( int pos, int numCols, bool WXUNUSED(updateLabels) )
         if (IsCellEditControlEnabled())
             DisableCellEditControl();
 
-        return m_table->InsertCols( pos, numCols );
+        bool done = m_table->InsertCols( pos, numCols );
+        m_numCols = m_table->GetNumberCols();
+        return done;
         // the table will have sent the results of the insert col
         // operation to this view object as a grid table message
     }
@@ -5850,9 +5862,15 @@ bool wxGrid::AppendCols( int numCols, bool WXUNUSED(updateLabels) )
         return FALSE;
     }
 
-    return ( m_table && m_table->AppendCols( numCols ) );
-    // the table will have sent the results of the append col
-    // operation to this view object as a grid table message
+    if ( m_table )
+    {
+        bool done = m_table->AppendCols( numCols );
+        m_numCols = m_table->GetNumberCols();
+        return done;
+        // the table will have sent the results of the append col
+        // operation to this view object as a grid table message
+    }
+    return FALSE;
 }
 
 
@@ -5871,7 +5889,9 @@ bool wxGrid::DeleteCols( int pos, int numCols, bool WXUNUSED(updateLabels) )
         if (IsCellEditControlEnabled())
             DisableCellEditControl();
 
-        return ( m_table->DeleteCols( pos, numCols ) );
+        bool done = m_table->DeleteCols( pos, numCols );
+        m_numCols = m_table->GetNumberCols();
+        return done;
         // the table will have sent the results of the delete col
         // operation to this view object as a grid table message
     }