1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-06 23:02:42 +02:00

Removed ZoomInfo::GetZoom() which I added in my previous commit

Just wasn't thinking.
This commit is contained in:
David Bailes 2017-04-06 13:31:04 +01:00
parent 1fa97a4b37
commit fc2628de4d
2 changed files with 5 additions and 11 deletions

View File

@ -5682,15 +5682,12 @@ void AudacityProject::OnZoomThousandthSecond()
void AudacityProject::OnZoomPreset(double newZoom)
{
double currentZoom = mViewInfo.GetZoom();
double zoomFactor = newZoom * mViewInfo.OffsetTimeByPixels(0.0, 1);
if (currentZoom != 0.0) {
double ratio = newZoom/currentZoom;
if (ratio > 1.0 )
ZoomInByFactor(ratio);
else if (ratio < 1.0)
ZoomOutByFactor(ratio);
}
if (zoomFactor > 1.0 )
ZoomInByFactor(zoomFactor);
else if (zoomFactor < 1.0)
ZoomOutByFactor(zoomFactor);
}
void AudacityProject::OnZoomFit()

View File

@ -86,9 +86,6 @@ public:
// There is NO GetZoom()!
// Use TimeToPosition and PositionToTime and OffsetTimeByPixels!
// DB added GetZoom() - needed for zoom presets.
double GetZoom() const {return zoom; }
// Limits zoom to certain bounds
void SetZoom(double pixelsPerSecond);