From f427c4574d8ced34dffe048387dc6b0ff2cb6ef0 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Tue, 20 Aug 2013 12:14:21 -0700 Subject: [PATCH] Revert "Don't invert horizontal scroll on the audio display on OS X" This has been fixed upstream. --- aegisub/src/audio_box.cpp | 4 ---- aegisub/src/audio_display.cpp | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/aegisub/src/audio_box.cpp b/aegisub/src/audio_box.cpp index ab49735c4..021d0c550 100644 --- a/aegisub/src/audio_box.cpp +++ b/aegisub/src/audio_box.cpp @@ -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; diff --git a/aegisub/src/audio_display.cpp b/aegisub/src/audio_display.cpp index fe502fca2..ea3087033 100644 --- a/aegisub/src/audio_display.cpp +++ b/aegisub/src/audio_display.cpp @@ -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(); }