Mercurial > hg > svapp
comparison framework/SVFileReader.cpp @ 624:15a566f26114 zoom
ZoomLevel fixes
author | Chris Cannam |
---|---|
date | Thu, 20 Sep 2018 11:45:37 +0100 |
parents | 021d42e6c8cb |
children | 10046d544e76 |
comparison
equal
deleted
inserted
replaced
623:9e15607531b2 | 624:15a566f26114 |
---|---|
767 READ_MANDATORY(int, zoom, toInt); | 767 READ_MANDATORY(int, zoom, toInt); |
768 READ_MANDATORY(int, followPan, toInt); | 768 READ_MANDATORY(int, followPan, toInt); |
769 READ_MANDATORY(int, followZoom, toInt); | 769 READ_MANDATORY(int, followZoom, toInt); |
770 QString tracking = attributes.value("tracking"); | 770 QString tracking = attributes.value("tracking"); |
771 | 771 |
772 ZoomLevel zoomLevel; | |
773 int deepZoom = attributes.value("deepZoom").trimmed().toInt(&ok); | |
774 if (ok && zoom == 1 && deepZoom > 1) { | |
775 zoomLevel = { ZoomLevel::PixelsPerFrame, deepZoom }; | |
776 } else { | |
777 zoomLevel = { ZoomLevel::FramesPerPixel, zoom }; | |
778 } | |
779 | |
772 // Specify the follow modes before we set the actual values | 780 // Specify the follow modes before we set the actual values |
773 view->setFollowGlobalPan(followPan); | 781 view->setFollowGlobalPan(followPan); |
774 view->setFollowGlobalZoom(followZoom); | 782 view->setFollowGlobalZoom(followZoom); |
775 view->setPlaybackFollow(tracking == "scroll" ? PlaybackScrollContinuous : | 783 view->setPlaybackFollow(tracking == "scroll" ? PlaybackScrollContinuous : |
776 tracking == "page" ? PlaybackScrollPageWithCentre : | 784 tracking == "page" ? PlaybackScrollPageWithCentre : |
777 tracking == "daw" ? PlaybackScrollPage | 785 tracking == "daw" ? PlaybackScrollPage |
778 : PlaybackIgnore); | 786 : PlaybackIgnore); |
779 | 787 |
780 // Then set these values | 788 // Then set these values |
781 view->setCentreFrame(centre); | 789 view->setCentreFrame(centre); |
782 view->setZoomLevel(zoom); | 790 view->setZoomLevel(zoomLevel); |
783 | 791 |
784 // And pane properties | 792 // And pane properties |
785 READ_MANDATORY(int, centreLineVisible, toInt); | 793 READ_MANDATORY(int, centreLineVisible, toInt); |
786 m_currentPane->setCentreLineVisible(centreLineVisible); | 794 m_currentPane->setCentreLineVisible(centreLineVisible); |
787 | 795 |