changeset 1521:d3ef60b6ae93 time-frequency-boxes

With duration and two values, propose a box model (value and extent)
author Chris Cannam
date Wed, 25 Sep 2019 11:09:06 +0100
parents 4eafe5a1b655
children d5ef91dc2ea7
files widgets/CSVFormatDialog.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/widgets/CSVFormatDialog.cpp	Wed Sep 25 09:46:27 2019 +0100
+++ b/widgets/CSVFormatDialog.cpp	Wed Sep 25 11:09:06 2019 +0100
@@ -318,6 +318,9 @@
     case CSVFormat::TwoDimensionalModelWithDurationAndPitch:
         s = f->getLayerPresentationName(LayerFactory::Notes);
         break;
+    case CSVFormat::TwoDimensionalModelWithDurationAndExtent:
+        s = f->getLayerPresentationName(LayerFactory::Boxes);
+        break;
     case CSVFormat::ThreeDimensionalModel:
         s = f->getLayerPresentationName(LayerFactory::Colour3DPlot);
         break;
@@ -582,6 +585,8 @@
     if (haveStartTime && haveDuration) {
         if (havePitch) {
             m_format.setModelType(CSVFormat::TwoDimensionalModelWithDurationAndPitch);
+        } else if (valueCount == 2) {
+            m_format.setModelType(CSVFormat::TwoDimensionalModelWithDurationAndExtent);
         } else {
             m_format.setModelType(CSVFormat::TwoDimensionalModelWithDuration);
         }