1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-22 15:20:15 +02:00

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
This commit is contained in:
Paul Licameli 2020-02-25 09:26:12 -05:00
parent 02dd7dc96b
commit 72ece7d9bf
2 changed files with 4 additions and 0 deletions

View File

@ -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 );

View File

@ -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)