diff framework/SVFileReader.cpp @ 628:b936872faff2

Merge from branch zoom
author Chris Cannam
date Wed, 10 Oct 2018 08:44:37 +0100
parents 15a566f26114
children 10046d544e76
line wrap: on
line diff
--- a/framework/SVFileReader.cpp	Tue Oct 09 15:55:16 2018 +0100
+++ b/framework/SVFileReader.cpp	Wed Oct 10 08:44:37 2018 +0100
@@ -769,6 +769,14 @@
     READ_MANDATORY(int, followZoom, toInt);
     QString tracking = attributes.value("tracking");
 
+    ZoomLevel zoomLevel;
+    int deepZoom = attributes.value("deepZoom").trimmed().toInt(&ok);
+    if (ok && zoom == 1 && deepZoom > 1) {
+        zoomLevel = { ZoomLevel::PixelsPerFrame, deepZoom };
+    } else {
+        zoomLevel = { ZoomLevel::FramesPerPixel, zoom };
+    }
+
     // Specify the follow modes before we set the actual values
     view->setFollowGlobalPan(followPan);
     view->setFollowGlobalZoom(followZoom);
@@ -779,7 +787,7 @@
 
     // Then set these values
     view->setCentreFrame(centre);
-    view->setZoomLevel(zoom);
+    view->setZoomLevel(zoomLevel);
 
     // And pane properties
     READ_MANDATORY(int, centreLineVisible, toInt);