1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-26 14:41:14 +01:00

Add and use some ZoomInfo and ViewInfo member functions, so we can eliminate...

... miscellaneous direct uses of ZoomInfo::zoom to test and set zoom level.

This includes all the remaining assignments to it.

But moving TrackInfo::PositionToTime and TrackInfo::TimeToPosition into
ZoomInfo and using them is needed to eliminate many more uses.

Also #if'd out the unused AudacityProject::OnZoomToggle().
This commit is contained in:
Paul-Licameli
2015-04-19 19:26:36 -04:00
committed by Paul Licameli
parent 8ba9ea5621
commit 5a6d5d1443
11 changed files with 174 additions and 73 deletions

View File

@@ -661,7 +661,7 @@ void ScreenFrame::TimeZoom(double seconds)
{
int width, height;
mContext.GetProject()->GetClientSize(&width, &height);
mContext.GetProject()->mViewInfo.zoom = (0.75 * width) / seconds;
mContext.GetProject()->mViewInfo.SetZoom((0.75 * width) / seconds);
mContext.GetProject()->RedrawProject();
}