changeset 2025:262c656ec78f zoom

Merge from default branch
author Chris Cannam
date Mon, 01 Oct 2018 15:49:32 +0100
parents 4c7f91c81ba9 (diff) 23aa78b94a58 (current diff)
children 337d16097516 d5296c91a0ff
files main/MainWindow.cpp repoint-lock.json
diffstat 5 files changed, 23 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/main/MainWindow.cpp	Mon Oct 01 14:47:03 2018 +0100
+++ b/main/MainWindow.cpp	Mon Oct 01 15:49:32 2018 +0100
@@ -3867,7 +3867,7 @@
     if (configuration.layer == LayerFactory::Spectrum) {
         pane->setPlaybackFollow(PlaybackScrollContinuous);
         pane->setFollowGlobalZoom(false);
-        pane->setZoomLevel(512);
+        pane->setZoomLevel(ZoomLevel(ZoomLevel::FramesPerPixel, 512));
     }
 
     if (configuration.layer != LayerFactory::TimeRuler &&
--- a/main/OSCHandler.cpp	Mon Oct 01 14:47:03 2018 +0100
+++ b/main/OSCHandler.cpp	Mon Oct 01 15:49:32 2018 +0100
@@ -497,8 +497,17 @@
             } else if (message.getArg(0).canConvert(QVariant::Double)) {
                 double level = message.getArg(0).toDouble();
                 Pane *currentPane = m_paneStack->getCurrentPane();
-                if (level < 1.0) level = 1.0;
-                if (currentPane) currentPane->setZoomLevel(int(lrint(level)));
+                ZoomLevel zoomLevel;
+                if (level >= 0.66) {
+                    zoomLevel = ZoomLevel(ZoomLevel::FramesPerPixel,
+                                          int(round(level)));
+                } else {
+                    zoomLevel = ZoomLevel(ZoomLevel::PixelsPerFrame,
+                                          int(round(1.0 / level)));
+                }
+                if (currentPane) {
+                    currentPane->setZoomLevel(zoomLevel);
+                }
             }
         }
 
--- a/main/main.cpp	Mon Oct 01 14:47:03 2018 +0100
+++ b/main/main.cpp	Mon Oct 01 15:49:32 2018 +0100
@@ -349,8 +349,9 @@
     // splash screen.
     PluginScan::getInstance()->scan();
     
-    // Permit size_t and PropertyName to be used as args in queued signal calls
+    // Permit these types to be used as args in queued signal calls
     qRegisterMetaType<PropertyContainer::PropertyName>("PropertyContainer::PropertyName");
+    qRegisterMetaType<ZoomLevel>("ZoomLevel");
 
     MainWindow::SoundOptions options = MainWindow::WithEverything;
     if (!audioOutput) options = 0;
--- a/repoint-lock.json	Mon Oct 01 14:47:03 2018 +0100
+++ b/repoint-lock.json	Mon Oct 01 15:49:32 2018 +0100
@@ -4,13 +4,13 @@
       "pin": "da86fb0bccb3"
     },
     "svcore": {
-      "pin": "9c14dee72329"
+      "pin": "32400727bcbd"
     },
     "svgui": {
-      "pin": "01778052e663"
+      "pin": "615eb28768ca"
     },
     "svapp": {
-      "pin": "9e15607531b2"
+      "pin": "15a566f26114"
     },
     "checker": {
       "pin": "2e8a5f665a07"
--- a/repoint-project.json	Mon Oct 01 14:47:03 2018 +0100
+++ b/repoint-project.json	Mon Oct 01 15:49:32 2018 +0100
@@ -16,15 +16,18 @@
         },
         "svcore": {
             "vcs": "hg",
-            "service": "soundsoftware"
+            "service": "soundsoftware",
+	    "branch": "zoom"
         },
         "svgui": {
             "vcs": "hg",
-            "service": "soundsoftware"
+            "service": "soundsoftware",
+	    "branch": "zoom"
         },
         "svapp": {
             "vcs": "hg",
-	    "service": "soundsoftware"
+	    "service": "soundsoftware",
+	    "branch": "zoom"
         },
         "checker": {
             "vcs": "hg",