1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-06 03:32:09 +01:00

static ViewInfo::Get() and ZoomInfo::Get()...

... not member functions of AudacityProject
This commit is contained in:
Paul Licameli
2019-04-28 06:49:47 -04:00
parent 14ab93a01f
commit b5a57682b6
52 changed files with 450 additions and 306 deletions

View File

@@ -42,6 +42,7 @@ It forwards the actual work of doing the commands to the ScreenshotCommand.
#include "Prefs.h"
#include "toolbars/ToolManager.h"
#include "ViewInfo.h"
#include "WaveTrack.h"
class OldStyleCommandType;
@@ -668,9 +669,10 @@ void ScreenFrame::OnCaptureSomething(wxCommandEvent & event)
void ScreenFrame::TimeZoom(double seconds)
{
auto &viewInfo = ViewInfo::Get( mContext.project );
int width, height;
mContext.project.GetClientSize(&width, &height);
mContext.project.mViewInfo.SetZoom((0.75 * width) / seconds);
viewInfo.SetZoom((0.75 * width) / seconds);
mContext.project.RedrawProject();
}