diff base/Selection.cpp @ 1811:796ae7eecced

Add Selection::toString for debug purposes
author Chris Cannam
date Wed, 08 Jan 2020 15:25:43 +0000
parents 48e9f538e6e9
children
line wrap: on
line diff
--- a/base/Selection.cpp	Fri Nov 22 14:12:16 2019 +0000
+++ b/base/Selection.cpp	Wed Jan 08 15:25:43 2020 +0000
@@ -227,3 +227,15 @@
     stream << indent << "</selections>\n";
 }
 
+QString
+MultiSelection::toString() const
+{
+    QStringList list;
+    for (SelectionList::iterator i = m_selections.begin();
+         i != m_selections.end(); ++i) {
+        list << QString("(%1,%2)")
+            .arg(i->getStartFrame())
+            .arg(i->getEndFrame());
+    }
+    return "(" + list.join(",") + ")";
+}