Hopefully fixed the grid scrolling bug
Originally committed to SVN as r422.
This commit is contained in:
parent
1fa1d75211
commit
b77543f179
2 changed files with 9 additions and 1 deletions
|
@ -590,8 +590,10 @@ void BaseGrid::OnMouseEvent(wxMouseEvent &event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Click type
|
// Click type
|
||||||
|
bool startedHolding = false;
|
||||||
if (click && !holding && validRow) {
|
if (click && !holding && validRow) {
|
||||||
holding = true;
|
holding = true;
|
||||||
|
startedHolding = true;
|
||||||
CaptureMouse();
|
CaptureMouse();
|
||||||
}
|
}
|
||||||
if (!event.ButtonIsDown(wxMOUSE_BTN_LEFT) && holding) {
|
if (!event.ButtonIsDown(wxMOUSE_BTN_LEFT) && holding) {
|
||||||
|
@ -609,7 +611,13 @@ void BaseGrid::OnMouseEvent(wxMouseEvent &event) {
|
||||||
if (row > maxVis) delta = +1;
|
if (row > maxVis) delta = +1;
|
||||||
|
|
||||||
// Scroll
|
// Scroll
|
||||||
|
if (delta) {
|
||||||
ScrollTo(yPos+delta*3);
|
ScrollTo(yPos+delta*3);
|
||||||
|
if (startedHolding) {
|
||||||
|
holding = false;
|
||||||
|
ReleaseMouse();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Click
|
// Click
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue