diff layer/ImageLayer.cpp @ 1470:696e569ff21b by-id

Further layer updates for ById
author Chris Cannam
date Fri, 28 Jun 2019 17:37:22 +0100
parents 11a150e65ee1
children f2525e6cbdf1
line wrap: on
line diff
--- a/layer/ImageLayer.cpp	Thu Jun 27 13:16:25 2019 +0100
+++ b/layer/ImageLayer.cpp	Fri Jun 28 17:37:22 2019 +0100
@@ -541,7 +541,7 @@
     m_originalPoint = m_editingPoint;
 
     if (m_editingCommand) finish(m_editingCommand);
-    m_editingCommand = new ChangeEventsCommand<Model>(m_model, "Add Image");
+    m_editingCommand = new ChangeEventsCommand(m_model.untyped, "Add Image");
     m_editingCommand->add(m_editingPoint);
 
     m_editing = true;
@@ -604,7 +604,7 @@
 
     Event point = Event(frame).withURI(url);
     auto command =
-        new ChangeEventsCommand<Model>(m_model, "Add Image");
+        new ChangeEventsCommand(m_model.untyped, "Add Image");
     command->add(point);
     finish(command);
     return true;
@@ -646,7 +646,7 @@
     frame = (frame / model->getResolution()) * model->getResolution();
 
     if (!m_editingCommand) {
-        m_editingCommand = new ChangeEventsCommand<Model>(m_model, tr("Move Image"));
+        m_editingCommand = new ChangeEventsCommand(m_model.untyped, tr("Move Image"));
     }
 
     m_editingCommand->remove(m_editingPoint);
@@ -691,7 +691,7 @@
         checkAddSource(dialog.getImage());
 
         auto command =
-            new ChangeEventsCommand<Model>(m_model, tr("Edit Image"));
+            new ChangeEventsCommand(m_model.untyped, tr("Edit Image"));
         command->remove(*points.begin());
         command->add(points.begin()->
                      withURI(dialog.getImage()).withLabel(dialog.getLabel()));
@@ -708,7 +708,7 @@
     if (!model) return;
 
     auto command =
-        new ChangeEventsCommand<Model>(m_model, tr("Drag Selection"));
+        new ChangeEventsCommand(m_model.untyped, tr("Drag Selection"));
 
     EventVector points =
         model->getEventsStartingWithin(s.getStartFrame(), s.getDuration());
@@ -730,7 +730,7 @@
     if (!model) return;
 
     auto command =
-        new ChangeEventsCommand<Model>(m_model, tr("Resize Selection"));
+        new ChangeEventsCommand(m_model.untyped, tr("Resize Selection"));
 
     EventVector points =
         model->getEventsStartingWithin(s.getStartFrame(), s.getDuration());
@@ -759,7 +759,7 @@
     if (!model) return;
 
     auto command =
-        new ChangeEventsCommand<Model>(m_model, tr("Delete Selection"));
+        new ChangeEventsCommand(m_model.untyped, tr("Delete Selection"));
 
     EventVector points =
         model->getEventsStartingWithin(s.getStartFrame(), s.getDuration());
@@ -812,7 +812,7 @@
         }
     }
 
-    auto command = new ChangeEventsCommand<Model>(m_model, tr("Paste"));
+    auto command = new ChangeEventsCommand(m_model.untyped, tr("Paste"));
 
     for (EventVector::const_iterator i = points.begin();
          i != points.end(); ++i) {