Fix grid selection when deleting grid rows or cols

The new selection right/bottom coordinate was off by 1 and could become
invalid.

Closes #24286.
This commit is contained in:
DietmarSchwertberger 2024-02-05 19:08:18 +01:00 committed by Vadim Zeitlin
parent 308815bafd
commit bfc3fcf0f4

View file

@ -488,7 +488,7 @@ void wxGridSelection::UpdateRows( size_t pos, int numRows )
count--;
}
else
block.SetBottomRow( pos );
block.SetBottomRow( pos - 1 );
}
}
}
@ -537,7 +537,7 @@ void wxGridSelection::UpdateCols( size_t pos, int numCols )
count--;
}
else
block.SetRightCol(pos);
block.SetRightCol( pos - 1 );
}
}
}