Bugzilla – Bug 2314
Zoom in fail when playing
Last modified: 2020-02-26 05:48:15 UTC
This bug is also in 2.3.3.
(In reply to James Crook from comment #0) It is a regression on 2.3.2 where it works properly as expected with the waveform updating correctly with the zoom
Likely to be due to 'improvements' that do things in the OnIdle event. Except during play we are not idle...
(In reply to James Crook from comment #2) Not a correct inference. During play, other threads do most of the work, and the main thread is indeed idle, waiting in its event loop most of the time, but redrawing sometimes in response to timer events.
Test on macOS 10.14.6, commit: b42341 Cannot duplicate using keyboard zoom or the Zoom tool and repeated clicks on the track. Is there another Zoom button that you use Peter?
I reproduced this clicking on the toolbar button with a + magnifier icon. Maybe it doesn't reproduce the other ways, but there is definitely a bug that I bisected to the indicated commit.
Hmmm. Still works fine using the toolbar magnifing glass + icon with a build I just did now. Very strange!!!!
(In reply to Cliff Scott from comment #6) I've just been resting P1 bugs following Paul's recent P1 review. And Now I find this working fine on Mac with Audacity 2.4.0 f13e53e (Iyt fails on 2.3.3 and is fine on 2.3.2). On W10 it still fails on 2.4.0 Audacity 2.4.0 b423413 latest working build I have from earlier yesterday. It fails on W10 on 2.3.3 to and works fine on W10 on 2.3.2 Do we know what the situation is on Linux - is this just a Windows bug now ?
(In reply to Peter Sampson from comment #7) On Linux with 2.4.0 (commit 3ba5f69089) the bug as described in "Steps to reproduce" occurs. "1. Create a 20 min mono chirp. 2. Start playing from the beginning. 3. Whilst still playing, press the zoom in button twice. Observe: A: The play cursor moves to reflect the increased zoom, but the waveform does not update to change its zoom. As a result the play cursor is on the wrong place in the chirp." B: When the cursor finally reaches the right hand edge of the track window, the waveform scrolls and the view is correct.
In the commit: 52ff705b0dff568512b6c601 In ProjectWindow::ZoomInByFactor(), the line trackPanel.Refresh(false); was removed after the call to ScrollIntoView(). However, ScrollIntoView() only calls trackPanel.Refresh(false) if it scrolls, so when it doesn't, the waveform doesn't get redrawn after the zoom in.
Thanks, David, for that diagnosis. I fixed it at: https://github.com/audacity/audacity/commit/72ece7d9bf5fe8cd8c8f84d3aa1c463640f84f8a Being careful not to reintroduce a dependency cycle
(In reply to Paul L from comment #10) Testing on W10 and macOS 10.15.3 with Audacity 2.4.0 c1ce3c7 This now zooms correctly while playing on both platforms
Works for me.