Mercurial > hg > svgui
diff view/View.cpp @ 1326:97c68bffbda6 zoom
More ZoomLevel updates
author | Chris Cannam |
---|---|
date | Thu, 20 Sep 2018 10:45:24 +0100 |
parents | 13d9b422f7fe |
children | 646e713a4632 |
line wrap: on
line diff
--- a/view/View.cpp Wed Sep 19 15:42:22 2018 +0100 +++ b/view/View.cpp Thu Sep 20 10:45:24 2018 +0100 @@ -54,7 +54,7 @@ QFrame(w), m_id(getNextId()), m_centreFrame(0), - m_zoomLevel(1024), + m_zoomLevel(ZoomLevel::FramesPerPixel, 1024), m_followPan(true), m_followZoom(true), m_followPlay(PlaybackScrollPageWithCentre), @@ -64,7 +64,7 @@ m_cache(0), m_buffer(0), m_cacheCentreFrame(0), - m_cacheZoomLevel(1024), + m_cacheZoomLevel(ZoomLevel::FramesPerPixel, 1024), m_selectionCached(false), m_deleting(false), m_haveSelectedLayer(false), @@ -319,7 +319,8 @@ void View::setStartFrame(sv_frame_t f) { - setCentreFrame(f + m_zoomLevel * (width() / 2)); + setCentreFrame(f + sv_frame_t(round + (m_zoomLevel.pixelsToFrames(width() / 2)))); } bool