diff rdf/RDFImporter.cpp @ 618:b1dc68507e46 sv-v1.7.1

* Layer data editor window: fix sorting for columns in region model, add Find feature * RDF import: assign names to layers based on event types, if no suitable labels are found in the RDF * Add label to status bar showing the last text that was passed in current layer (so e.g. counting 1, 2, 3, 4 if that's what beats are labelled) * Better layout of text labels for region layers in segmentation mode when they are close together * Give text layer the same method for finding "nearest point" as region and note layers, should improve its editability
author Chris Cannam
date Thu, 22 Oct 2009 15:54:21 +0000
parents 24f06d34ac99
children a1ae2c1f80ab
line wrap: on
line diff
--- a/rdf/RDFImporter.cpp	Thu Oct 15 11:32:21 2009 +0000
+++ b/rdf/RDFImporter.cpp	Thu Oct 22 15:54:21 2009 +0000
@@ -855,7 +855,12 @@
                     ).arg(m_uristring).arg(type);
             QString title = SimpleSPARQLQuery::singleResultQuery
                 (s, titleQuery, "title").value;
-            if (title != "") model->setObjectName(title);
+            if (title == "") {
+                // take it from the end of the event type
+                title = type;
+                title.replace(QRegExp("^.*[/#]"), "");
+            }
+            model->setObjectName(title);
 
             modelMap[timeline][type][dimensions][haveDuration] = model;
             models.push_back(model);