diff framework/Document.h @ 672:ae7584dbd668 tuning-difference

Provide facility to re-align models
author Chris Cannam
date Fri, 17 May 2019 09:45:12 +0100
parents 351b1302064e
children 1f18e0f64af8
line wrap: on
line diff
--- a/framework/Document.h	Thu May 16 15:55:46 2019 +0100
+++ b/framework/Document.h	Fri May 17 09:45:12 2019 +0100
@@ -294,6 +294,12 @@
     void alignModels();
 
     /**
+     * Re-generate alignments for all appropriate models against the
+     * main model.  Existing alignments will be re-calculated.
+     */
+    void realignModels();
+
+    /**
      * Return true if any external files (most obviously audio) failed
      * to be found on load, so that the document is incomplete
      * compared to its saved description.
@@ -338,11 +344,11 @@
 
     /**
      * If model is suitable for alignment, align it against the main
-     * model and store the alignment in the model.  (If the model has
-     * an alignment already for the current main model, leave it
-     * unchanged.)
+     * model and store the alignment in the model. If the model has an
+     * alignment already for the current main model, leave it
+     * unchanged unless forceRecalculate is true.
      */
-    void alignModel(Model *);
+    void alignModel(Model *, bool forceRecalculate = false);
 
     /*
      * Every model that is in use by a layer in the document must be