From f8ddb870c1d77043c801622cca29b4122bf7b7a9 Mon Sep 17 00:00:00 2001 From: Michael Bedward Date: Mon, 24 Jul 2000 06:27:12 +0000 Subject: [PATCH] Changes as per patch from Paul Gammans to fix bug in edit control handling. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/grid.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 1b31ef10db..4cb84a54b4 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -3817,6 +3817,8 @@ bool wxGrid::Redimension( wxGridTableMessage& msg ) wxGridCellAttrProvider * attrProvider = m_table->GetAttrProvider(); if (attrProvider) { attrProvider->UpdateAttrRows( pos, -((int)numRows) ); +// ifdef'd out following patch from Paul Gammans +#if 0 // No need to touch column attributes, unless we // removed _all_ rows, in this case, we remove // all column attributes. @@ -3824,6 +3826,7 @@ bool wxGrid::Redimension( wxGridTableMessage& msg ) // needed data is not available inside UpdateAttrRows. if ( !GetNumberRows() ) attrProvider->UpdateAttrCols( 0, -GetNumberCols() ); +#endif } if ( !GetBatchCount() ) { @@ -3950,6 +3953,8 @@ bool wxGrid::Redimension( wxGridTableMessage& msg ) wxGridCellAttrProvider * attrProvider = m_table->GetAttrProvider(); if (attrProvider) { attrProvider->UpdateAttrCols( pos, -((int)numCols) ); +// ifdef'd out following patch from Paul Gammans +#if 0 // No need to touch row attributes, unless we // removed _all_ columns, in this case, we remove // all row attributes. @@ -3957,6 +3962,7 @@ bool wxGrid::Redimension( wxGridTableMessage& msg ) // needed data is not available inside UpdateAttrCols. if ( !GetNumberCols() ) attrProvider->UpdateAttrRows( 0, -GetNumberRows() ); +#endif } if ( !GetBatchCount() ) { @@ -6161,12 +6167,8 @@ void wxGrid::EnableEditing( bool edit ) // if ( edit != m_editable ) { + if(!edit) EnableCellEditControl(edit); m_editable = edit; - - // FIXME IMHO this won't disable the edit control if edit == FALSE - // because of the check in the beginning of - // EnableCellEditControl() just below (VZ) - EnableCellEditControl(m_editable); } } @@ -6260,6 +6262,7 @@ void wxGrid::ShowCellEditControl() { if ( !IsVisible( m_currentCellCoords ) ) { + m_cellEditCtrlEnabled = false; return; } else