Add wxGrid::m_dragMoveCol field separate from m_dragRowOrCol

Don't reuse the same m_dragRowOrCol variable for both the index of the
row or column being drag-resized and for the index of the column being
drag-moved. Reusing it was confusing and made it more difficult what the
code was doing and what invariants were preserved in it, and just wasn't
worth saving a few bytes per wxGrid object.

No real changes.
This commit is contained in:
Vadim Zeitlin
2020-02-23 14:47:42 +01:00
parent 05c5891bf6
commit 52b7267aac
2 changed files with 13 additions and 8 deletions

View File

@@ -2298,6 +2298,10 @@ protected:
bool m_canDragGridSize;
bool m_canDragCell;
// Index of the column being drag-moved or -1 if there is no move operation
// in progress.
int m_dragMoveCol;
// the last position (horizontal or vertical depending on whether the user
// is resizing a column or a row) where a row or column separator line was
// dragged by the user or -1 of there is no drag operation in progress