From: Julian Smart Date: Sun, 11 Jan 2004 14:28:38 +0000 (+0000) Subject: Applied patch [ 800086 ] GridCellTextEditor wxTE_RICH misbehaving X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7b519e5e0c8f099d8ab7e987266cd10eb1726a4c?ds=inline Applied patch [ 800086 ] GridCellTextEditor wxTE_RICH misbehaving Don't set the value of the hidden editor control (useless) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 6e36f1d0fd..753fcf01b7 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -668,7 +668,8 @@ bool wxGridCellTextEditor::EndEdit(int row, int col, grid->GetTable()->SetValue(row, col, value); m_startValue = wxEmptyString; - Text()->SetValue(m_startValue); + // No point in setting the text of the hidden control + //Text()->SetValue(m_startValue); return changed; } @@ -4240,9 +4241,9 @@ void wxGrid::CalcDimensions() GetViewStart( &x, &y ); // ensure the position is valid for the new scroll ranges - if ( x >= w ) + if ( x >= w ) x = wxMax( w - 1, 0 ); - if ( y >= h ) + if ( y >= h ) y = wxMax( h - 1, 0 ); // do set scrollbar parameters