Hopefully fixed the grid scrolling bug

Originally committed to SVN as r422.
This commit is contained in:
Rodrigo Braz Monteiro 2006-06-20 23:32:01 +00:00
parent 1fa1d75211
commit b77543f179
2 changed files with 9 additions and 1 deletions

View file

@ -590,8 +590,10 @@ void BaseGrid::OnMouseEvent(wxMouseEvent &event) {
}
// Click type
bool startedHolding = false;
if (click && !holding && validRow) {
holding = true;
startedHolding = true;
CaptureMouse();
}
if (!event.ButtonIsDown(wxMOUSE_BTN_LEFT) && holding) {
@ -609,7 +611,13 @@ void BaseGrid::OnMouseEvent(wxMouseEvent &event) {
if (row > maxVis) delta = +1;
// Scroll
if (delta) {
ScrollTo(yPos+delta*3);
if (startedHolding) {
holding = false;
ReleaseMouse();
}
}
}
// Click

Binary file not shown.