Ensure that the smart-scrolling on row click doesn't scroll the clicked row out of view

Originally committed to SVN as r5584.
This commit is contained in:
Thomas Goyne 2011-09-01 23:48:38 +00:00
parent f21e991d67
commit 4cce4ff40d
1 changed files with 1 additions and 1 deletions

View File

@ -652,7 +652,7 @@ void BaseGrid::OnMouseEvent(wxMouseEvent &event) {
if (row > maxVis) delta = +3;
if (delta) {
ScrollTo(yPos + delta);
ScrollTo(MID(row - (h / lineHeight), yPos + delta, row));
// End the hold if this was a mousedown to avoid accidental
// selection of extra lines