projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
resource stack structure that sets up correct resource, new entry points for shared...
[wxWidgets.git]
/
src
/
generic
/
gridsel.cpp
diff --git
a/src/generic/gridsel.cpp
b/src/generic/gridsel.cpp
index f6e4b2ba719804d4d9b5aa4b16eccb71603b668f..2781694fb5bd6d54549a6d7a7aa7017969e0ab72 100644
(file)
--- a/
src/generic/gridsel.cpp
+++ b/
src/generic/gridsel.cpp
@@
-402,7
+402,11
@@
void wxGridSelection::SelectBlock( int topRow, int leftCol,
}
// Handle single cell selection in SelectCell.
}
// 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 );
SelectCell( topRow, leftCol, ControlDown, ShiftDown,
AltDown, MetaDown, sendEvent );