if ( numRows >= curNumRows )
{
- m_data.Clear(); // don't release memory just yet
+ m_data.Clear();
}
else
{
//
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 );
return;
}
- if ( dragRow >= 0 && dragRow < GetNumberRows())
+ if ( dragRow >= 0 )
{
m_dragRowOrCol = dragRow;
return;
}
- if ( dragCol >= 0 && dragCol < GetNumberCols())
+ if ( dragCol >= 0 )
{
m_dragRowOrCol = dragCol;
defaultDist = 1;
size_t i_max = coord / defaultDist,
i_min = 0;
+
if (BorderArray.IsEmpty())
{
- if((int) i_max <= nMax)
+ if((int) i_max < nMax)
return i_max;
- return maxOnOverflow ? (int)i_max : -1;
+ return maxOnOverflow ? nMax - 1 : -1;
}
if ( i_max >= BorderArray.GetCount())