Added Paul Gamman's patch for 0 as FALSE in bool editor and renderer.

Fixed bug in grid selection code that caused crashes (e.g. when grid
had just 1 col and mode was row selection).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Bedward
2000-08-08 10:43:16 +00:00
parent a98c006d8d
commit 695a326318
2 changed files with 13 additions and 3 deletions

View File

@@ -402,7 +402,11 @@ void wxGridSelection::SelectBlock( int topRow, int leftCol,
}
// Handle single cell selection in SelectCell.
if ( topRow == bottomRow && leftCol == rightCol )
// (MB: added check for selection mode here to prevent
// crashes if, for example, we are select rows and the
// grid only has 1 col)
if ( m_selectionMode == wxGrid::wxGridSelectCells &&
topRow == bottomRow && leftCol == rightCol )
SelectCell( topRow, leftCol, ControlDown, ShiftDown,
AltDown, MetaDown, sendEvent );