1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-23 06:31:17 +01:00

Added zoom presets

Please Note:
In ViewInfo.h there is the comment left by Paul:
// There is NO GetZoom()!
// Use TimeToPosition and PositionToTime and OffsetTimeByPixels!

I needed to get the value of the current zoom so that I could use the functions AudacityProject::ZoomInByFactor and AudacityProject::ZoomOutByFactor to handle the change in zoom when a preset zoom is chosen. So I added GetZoom() for this use.
This commit is contained in:
David Bailes
2017-04-06 12:42:58 +01:00
parent c1592d2a1a
commit 1fa97a4b37
3 changed files with 48 additions and 0 deletions

View File

@@ -86,6 +86,9 @@ 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);