Revert "Don't invert horizontal scroll on the audio display on OS X"

This has been fixed upstream.
This commit is contained in:
Thomas Goyne 2013-08-20 12:14:21 -07:00
parent 0b210673f9
commit f427c4574d
2 changed files with 2 additions and 4 deletions

View file

@ -151,13 +151,9 @@ void AudioBox::OnMouseWheel(wxMouseEvent &evt) {
bool zoom = evt.CmdDown() != OPT_GET("Audio/Wheel Default to Zoom")->GetBool();
if (!zoom) {
int amount = -evt.GetWheelRotation() * GetClientSize().GetWidth() / (evt.GetWheelDelta() * 3);
// If the user did a horizontal scroll the amount should be inverted
// for it to be natural.
// On OS X it's pre-flipped for some reason.
#ifndef __APPLE__
if (evt.GetWheelAxis() == 1) amount = -amount;
#endif
// Reset any accumulated zoom
mouse_zoom_accum = 0;

View file

@ -683,6 +683,8 @@ void AudioDisplay::SetZoomLevel(int new_zoom_level)
timeline->ChangeZoom(ms_per_pixel);
ScrollPixelToLeft(AbsoluteXFromTime(cursor_time) - cursor_pos);
if (track_cursor_pos >= 0)
track_cursor_pos = AbsoluteXFromTime(cursor_time);
Refresh();
}