From: Roger Gammans Date: Mon, 12 Apr 2004 19:59:46 +0000 (+0000) Subject: * fix bug where editing of the bootom and right most cell is not X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/13f6e9e8e158fc74cb8f13227fb3e15adbeff7c5 * fix bug where editing of the bootom and right most cell is not corectly completed. * Some tidying of end edit code paths. (such as in AutoSizeRowOrCol) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index ee086a77c8..13be5b7883 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -6280,8 +6280,7 @@ void wxGrid::OnKeyDown( wxKeyEvent& event ) else { // at the bottom of a column - HideCellEditControl(); - SaveEditControlValue(); + DisableCellEditControl(); } } break; @@ -6300,8 +6299,7 @@ void wxGrid::OnKeyDown( wxKeyEvent& event ) else { // at left of grid - HideCellEditControl(); - SaveEditControlValue(); + DisableCellEditControl(); } } else @@ -6313,8 +6311,7 @@ void wxGrid::OnKeyDown( wxKeyEvent& event ) else { // at right of grid - HideCellEditControl(); - SaveEditControlValue(); + DisableCellEditControl(); } } break; @@ -6463,7 +6460,6 @@ void wxGrid::SetCurrentCell( const wxGridCellCoords& coords ) if ( m_currentCellCoords != wxGridNoCellCoords ) { - HideCellEditControl(); DisableCellEditControl(); if ( IsVisible( m_currentCellCoords, FALSE ) ) @@ -9524,6 +9520,10 @@ void wxGrid::AutoSizeColOrRow( int colOrRow, bool setAsMin, bool column ) { 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;