changeset 2334:a2162fd2e8eb

Merge from branch time-frequency-boxes
author Chris Cannam
date Wed, 25 Sep 2019 13:49:42 +0100
parents 61295186a887 (current diff) 2721030c939f (diff)
children 34b912894010
files
diffstat 8 files changed, 39 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Sep 19 13:25:37 2019 +0100
+++ b/.hgtags	Wed Sep 25 13:49:42 2019 +0100
@@ -91,3 +91,4 @@
 1d87a709fe1a8ba900e470d2b34a264352e612cd sv_v3.3pre2
 1d87a709fe1a8ba900e470d2b34a264352e612cd sv_v3.3pre2
 efea4a6a909a372460de1d21bf7d473c50bfeaac sv_v3.3pre2
+44d0b0fc4d04ebafa4660dba29ba437b34c621ba sv_v4.0pre1
--- a/CHANGELOG	Thu Sep 19 13:25:37 2019 +0100
+++ b/CHANGELOG	Wed Sep 25 13:49:42 2019 +0100
@@ -1,5 +1,14 @@
 
-Changes in Sonic Visualiser v3.3 (Apr 2019) since the previous release 3.2.1:
+Changes in Sonic Visualiser v4.0 since the previous release 3.3:
+
+ - Add Time-Frequency Box annotation layer type. Because this
+   introduces a new layer type into the session file format, the major
+   version number has been bumped to v4.0. (Sessions saved from v4.0
+   can be opened in earlier versions of Sonic Visualiser, but any
+   Time-Frequency Box layers will not be loaded.)
+ 
+
+Changes in Sonic Visualiser v3.3 (May 2019) since the previous release 3.2.1:
 
  - Add support for reading the Opus audio codec on all platforms
 
--- a/main/MainWindow.cpp	Thu Sep 19 13:25:37 2019 +0100
+++ b/main/MainWindow.cpp	Wed Sep 25 13:49:42 2019 +0100
@@ -357,9 +357,7 @@
         startOSCQueue(false);
     }
     
-/*
     QTimer::singleShot(500, this, SLOT(betaReleaseWarning()));
-*/
     
     QString warning = PluginScan::getInstance()->getStartupFailureReport();
     if (warning != "") {
@@ -4022,16 +4020,13 @@
 
         Layer *newLayer = nullptr;
 
+        bool isNewEmptyLayer = false;
+        
         if (emptyTypes.find(type) != emptyTypes.end()) {
 
             newLayer = m_document->createEmptyLayer(type);
             if (newLayer) {
-                for (auto &a : m_toolActions) {
-                    if (a.first == ViewManager::DrawMode) {
-                        a.second->trigger();
-                        break;
-                    }
-                }
+                isNewEmptyLayer = true;
             }
 
         } else {
@@ -4070,6 +4065,23 @@
             }
         }
 
+        if (isNewEmptyLayer) {
+
+            double vmin, vmax, dmin, dmax;
+            QString unit;
+            if (pane->getTopLayerDisplayExtents
+                (vmin, vmax, dmin, dmax, &unit)) {
+                newLayer->adoptExtents(vmin, vmax, unit);
+            }
+            
+            for (auto &a : m_toolActions) {
+                if (a.first == ViewManager::DrawMode) {
+                    a.second->trigger();
+                    break;
+                }
+            }
+        }
+
         if (newLayer) {
             m_document->addLayerToView(pane, newLayer);
             m_paneStack->setCurrentLayer(pane, newLayer);
@@ -4540,7 +4552,6 @@
     shownOnce = true;
 }
 
-/*
 void
 MainWindow::betaReleaseWarning()
 {
@@ -4548,7 +4559,6 @@
         (this, tr("Beta release"),
          tr("<b>This is a beta release of Sonic Visualiser</b><p>Please see the \"What's New\" option in the Help menu for a list of changes since the last proper release.</p>"));
 }
-*/
 
 void
 MainWindow::pluginPopulationWarning()
--- a/main/MainWindow.h	Thu Sep 19 13:25:37 2019 +0100
+++ b/main/MainWindow.h	Wed Sep 25 13:49:42 2019 +0100
@@ -155,9 +155,7 @@
     virtual void midiEventsAvailable();
     virtual void playStatusChanged(bool);
 
-/*
     virtual void betaReleaseWarning();
-*/
     virtual void pluginPopulationWarning();
 
     virtual void saveSessionAsTemplate();
--- a/repoint-lock.json	Thu Sep 19 13:25:37 2019 +0100
+++ b/repoint-lock.json	Wed Sep 25 13:49:42 2019 +0100
@@ -4,13 +4,13 @@
       "pin": "0b6802e3b755"
     },
     "svcore": {
-      "pin": "4eac4bf35b45"
+      "pin": "f0ffc88a36b3"
     },
     "svgui": {
-      "pin": "872873aa6463"
+      "pin": "d3ef60b6ae93"
     },
     "svapp": {
-      "pin": "721eb532840d"
+      "pin": "3e930ea94db6"
     },
     "checker": {
       "pin": "c8c17e51aab0"
@@ -46,7 +46,7 @@
       "pin": "f3731af47c4b"
     },
     "icons/scalable": {
-      "pin": "69063e69d044"
+      "pin": "be45984f7915"
     }
   }
 }
--- a/sonic-visualiser.qrc	Thu Sep 19 13:25:37 2019 +0100
+++ b/sonic-visualiser.qrc	Wed Sep 25 13:49:42 2019 +0100
@@ -61,6 +61,7 @@
     <file>icons/scalable/smooth.svg</file>
     <file>icons/scalable/invert-colour.svg</file>
     <file>icons/scalable/values.svg</file>
+    <file>icons/scalable/boxes.svg</file>
     <file>icons/scalable/waveform.svg</file>
     <file>icons/scalable/zoom.svg</file>
     <file>icons/scalable/zoom-in.svg</file>
--- a/test/test-session-export.sh	Thu Sep 19 13:25:37 2019 +0100
+++ b/test/test-session-export.sh	Wed Sep 25 13:49:42 2019 +0100
@@ -1,7 +1,7 @@
 #!/bin/bash
 #
 # Test that loading and re-saving a session does not change its contents
-# Must be run from same directory as the SV binary
+# Must be run from directory that contains this script
 
 set -e
 
@@ -10,7 +10,7 @@
 set -u
 
 sv="../sonic-visualiser"
-if [ ! -x "$sv" ]; then
+if [ ! -f "$sv" -o ! -x "$sv" ]; then
     echo "This script must be run from the sonic-visualiser/test directory" 1>&2
     exit 1
 fi
--- a/version.h	Thu Sep 19 13:25:37 2019 +0100
+++ b/version.h	Wed Sep 25 13:49:42 2019 +0100
@@ -1,1 +1,1 @@
-#define SV_VERSION "3.4"
+#define SV_VERSION "4.0-pre1"