diff layer/LayerFactory.cpp @ 1423:62e908518c71 single-point

Update to Event api in place of Clipboard points
author Chris Cannam
date Fri, 08 Mar 2019 13:37:30 +0000
parents c8a6fd3f9dff
children e1a08da75427
line wrap: on
line diff
--- a/layer/LayerFactory.cpp	Tue Mar 05 10:02:48 2019 +0000
+++ b/layer/LayerFactory.cpp	Fri Mar 08 13:37:30 2019 +0000
@@ -544,24 +544,22 @@
 LayerFactory::LayerType
 LayerFactory::getLayerTypeForClipboardContents(const Clipboard &clip)
 {
-    const Clipboard::PointList &contents = clip.getPoints();
+    const EventVector &contents = clip.getPoints();
 
-    bool haveFrame = false;
     bool haveValue = false;
     bool haveDuration = false;
     bool haveLevel = false;
 
-    for (Clipboard::PointList::const_iterator i = contents.begin();
+    for (EventVector::const_iterator i = contents.begin();
          i != contents.end(); ++i) {
-        if (i->haveFrame()) haveFrame = true;
-        if (i->haveValue()) haveValue = true;
-        if (i->haveDuration()) haveDuration = true;
-        if (i->haveLevel()) haveLevel = true;
+        if (i->hasValue()) haveValue = true;
+        if (i->hasDuration()) haveDuration = true;
+        if (i->hasLevel()) haveLevel = true;
     }
 
-    if (haveFrame && haveValue && haveDuration && haveLevel) return Notes;
-    if (haveFrame && haveValue && haveDuration) return Regions;
-    if (haveFrame && haveValue) return TimeValues;
+    if (haveValue && haveDuration && haveLevel) return Notes;
+    if (haveValue && haveDuration) return Regions;
+    if (haveValue) return TimeValues;
     return TimeInstants;
 }