mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-05 16:43:52 +01:00
Bug2314: Zoom in should work during playback...
...bug began at 52ff705b0d
Fixing this in a way that does not make a dependency cycle between ProjectWindow
and TrackPanel
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user