mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-19 17:40:51 +02:00
Bug1387: enable autoscrolling even when the track extends beyond the screen
This commit is contained in:
parent
0a0cbbba20
commit
ba0b5a70a3
@ -1015,6 +1015,25 @@ void TrackPanel::ScrollDuringDrag()
|
||||
mAutoScrolling = true;
|
||||
mListener->TP_ScrollLeft();
|
||||
}
|
||||
else {
|
||||
// Bug1387: enable autoscroll during drag, if the pointer is at either extreme x
|
||||
// coordinate of the screen, even if that is still within the track area.
|
||||
|
||||
int xx = mMouseMostRecentX, yy = 0;
|
||||
this->ClientToScreen(&xx, &yy);
|
||||
if (xx == 0) {
|
||||
mAutoScrolling = true;
|
||||
mListener->TP_ScrollLeft();
|
||||
}
|
||||
else {
|
||||
int width, height;
|
||||
::wxDisplaySize(&width, &height);
|
||||
if (xx == width - 1) {
|
||||
mAutoScrolling = true;
|
||||
mListener->TP_ScrollRight();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mAutoScrolling) {
|
||||
// AS: To keep the selection working properly as we scroll,
|
||||
|
Loading…
x
Reference in New Issue
Block a user