Reverted the "Prevented dragging dividers outside cells" change which just
worked around the symptoms of the bug in CoordToRowOrCol.
Removed posssibility to resize columns even from below the grid or rows from
the right of the grid - that kind of "dragging dividers" wasn't even
prevented by the previous change (according to Patch 607387).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17141
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if ( numRows >= curNumRows )
{
if ( numRows >= curNumRows )
{
- m_data.Clear(); // don't release memory just yet
//
else if ( event.Moving() && !event.IsButton() )
{
//
else if ( event.Moving() && !event.IsButton() )
{
+ if( coords.GetRow() < 0 || coords.GetCol() < 0 )
+ {
+ // out of grid cell area
+ ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL);
+ return;
+ }
+
int dragRow = YToEdgeOfRow( y );
int dragCol = XToEdgeOfCol( x );
int dragRow = YToEdgeOfRow( y );
int dragCol = XToEdgeOfCol( x );
- if ( dragRow >= 0 && dragRow < GetNumberRows())
{
m_dragRowOrCol = dragRow;
{
m_dragRowOrCol = dragRow;
- if ( dragCol >= 0 && dragCol < GetNumberCols())
{
m_dragRowOrCol = dragCol;
{
m_dragRowOrCol = dragCol;
defaultDist = 1;
size_t i_max = coord / defaultDist,
i_min = 0;
defaultDist = 1;
size_t i_max = coord / defaultDist,
i_min = 0;
if (BorderArray.IsEmpty())
{
if (BorderArray.IsEmpty())
{
- if((int) i_max <= nMax)
- return maxOnOverflow ? (int)i_max : -1;
+ return maxOnOverflow ? nMax - 1 : -1;
}
if ( i_max >= BorderArray.GetCount())
}
if ( i_max >= BorderArray.GetCount())