]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
Only call Select within SetString when internal data has been restored,
[wxWidgets.git] / src / generic / grid.cpp
index ee086a77c8aa5361a5e22e4e0c967216db8baa8c..13be5b78836f830bc76ca8c46eaec3d8c0a412b5 100644 (file)
@@ -6280,8 +6280,7 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
                     else
                     {
                         // at the bottom of a column
                     else
                     {
                         // at the bottom of a column
-                        HideCellEditControl();
-                        SaveEditControlValue();
+                        DisableCellEditControl();
                     }
                 }
                 break;
                     }
                 }
                 break;
@@ -6300,8 +6299,7 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
                     else
                     {
                         // at left of grid
                     else
                     {
                         // at left of grid
-                        HideCellEditControl();
-                        SaveEditControlValue();
+                        DisableCellEditControl();
                     }
                 }
                 else
                     }
                 }
                 else
@@ -6313,8 +6311,7 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
                     else
                     {
                         // at right of grid
                     else
                     {
                         // at right of grid
-                        HideCellEditControl();
-                        SaveEditControlValue();
+                        DisableCellEditControl();
                     }
                 }
                 break;
                     }
                 }
                 break;
@@ -6463,7 +6460,6 @@ void wxGrid::SetCurrentCell( const wxGridCellCoords& coords )
 
     if ( m_currentCellCoords != wxGridNoCellCoords )
     {
 
     if ( m_currentCellCoords != wxGridNoCellCoords )
     {
-        HideCellEditControl();
         DisableCellEditControl();
 
         if ( IsVisible( m_currentCellCoords, FALSE ) )
         DisableCellEditControl();
 
         if ( IsVisible( m_currentCellCoords, FALSE ) )
@@ -9524,6 +9520,10 @@ void wxGrid::AutoSizeColOrRow( int colOrRow, bool setAsMin, bool column )
 {
     wxClientDC dc(m_gridWin);
 
 {
     wxClientDC dc(m_gridWin);
 
+    //Cancel editting of cell
+    HideCellEditControl();
+    SaveEditControlValue();
+
     // init both of them to avoid compiler warnings, even if weo nly need one
     int row = -1,
         col = -1;
     // init both of them to avoid compiler warnings, even if weo nly need one
     int row = -1,
         col = -1;