diff data/model/ImageModel.h @ 1674:69ab62d378bf osc-script

Ensure image & text models get the proper attribute names (which are not the same as the default event ones)
author Chris Cannam
date Wed, 27 Mar 2019 16:06:35 +0000
parents a77a7e8c085c
children f97d64b8674f
line wrap: on
line diff
--- a/data/model/ImageModel.h	Wed Mar 27 14:15:21 2019 +0000
+++ b/data/model/ImageModel.h	Wed Mar 27 16:06:35 2019 +0000
@@ -142,7 +142,7 @@
     void add(Event e) override {
 
         {   QMutexLocker locker(&m_mutex);
-            m_events.add(e.withoutDuration());
+            m_events.add(e.withoutDuration().withoutValue().withoutLevel());
         }
         
         m_notifier.update(e.getFrame(), m_resolution);
@@ -255,8 +255,11 @@
                           // subsequent events are always notified
              .arg(getObjectExportId(&m_events))
              .arg(extraAttributes));
+
+        Event::ExportNameOptions options;
+        options.uriAttributeName = "image";
         
-        m_events.toXml(out, indent, QString("dimensions=\"1\""));
+        m_events.toXml(out, indent, QString("dimensions=\"1\""), options);
     }
   
 protected: