From 72ece7d9bf5fe8cd8c8f84d3aa1c463640f84f8a Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Tue, 25 Feb 2020 09:26:12 -0500 Subject: [PATCH] Bug2314: Zoom in should work during playback... ...bug began at 52ff705b0dff568512b6c6016936b78311c56a69 Fixing this in a way that does not make a dependency cycle between ProjectWindow and TrackPanel --- src/ProjectWindow.cpp | 2 ++ src/menus/ViewMenus.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/ProjectWindow.cpp b/src/ProjectWindow.cpp index b6a88599f..1285e51b3 100644 --- a/src/ProjectWindow.cpp +++ b/src/ProjectWindow.cpp @@ -401,6 +401,8 @@ unsigned operator() double ZoomFactor = pow(2.0, steps); AudacityProject *p = GetProject(); if( steps > 0 ) + // PRL: Track panel refresh may be needed if you reenable this + // code, but we don't want this file dependent on TrackPanel.cpp p->ZoomInByFactor( ZoomFactor ); else p->ZoomOutByFactor( ZoomFactor ); diff --git a/src/menus/ViewMenus.cpp b/src/menus/ViewMenus.cpp index 05abe4789..4a9e398fc 100644 --- a/src/menus/ViewMenus.cpp +++ b/src/menus/ViewMenus.cpp @@ -166,8 +166,10 @@ struct Handler final void OnZoomIn(const CommandContext &context) { auto &project = context.project; + auto &trackPanel = TrackPanel::Get( project ); auto &window = ProjectWindow::Get( project ); window.ZoomInByFactor( 2.0 ); + trackPanel.Refresh(false); } void OnZoomNormal(const CommandContext &context)