mirror of https://github.com/odrling/Aegisub
Fixed audio dragging bugs related to scrub bar
Originally committed to SVN as r456.
This commit is contained in:
parent
2529df9cdb
commit
453a594264
|
@ -1268,7 +1268,7 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scale dragging
|
// Scale dragging
|
||||||
if (onScale || draggingScale) {
|
if ((hold == 0 && onScale) || draggingScale) {
|
||||||
if (event.ButtonDown(wxMOUSE_BTN_LEFT)) {
|
if (event.ButtonDown(wxMOUSE_BTN_LEFT)) {
|
||||||
lastDragX = x;
|
lastDragX = x;
|
||||||
draggingScale = true;
|
draggingScale = true;
|
||||||
|
@ -1279,12 +1279,14 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) {
|
||||||
UpdatePosition(Position + delta);
|
UpdatePosition(Position + delta);
|
||||||
UpdateImage();
|
UpdateImage();
|
||||||
Refresh(false);
|
Refresh(false);
|
||||||
|
SetCursor(wxNullCursor);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else draggingScale = false;
|
else draggingScale = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Outside
|
// Outside
|
||||||
if (!inside) return;
|
if (!inside && hold == 0) return;
|
||||||
|
|
||||||
// Left/middle click
|
// Left/middle click
|
||||||
if (event.ButtonDown(wxMOUSE_BTN_LEFT) || event.Button(wxMOUSE_BTN_MIDDLE)) {
|
if (event.ButtonDown(wxMOUSE_BTN_LEFT) || event.Button(wxMOUSE_BTN_MIDDLE)) {
|
||||||
|
|
Loading…
Reference in New Issue