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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user