diff view/Pane.cpp @ 1490:c83504eb2649

Attempt a mechanism for the View to time-align a layer on display using an aligning version of the ViewProxy
author Chris Cannam
date Fri, 02 Aug 2019 16:44:32 +0100
parents e540aa5d89cd
children 175770a13495
line wrap: on
line diff
--- a/view/Pane.cpp	Fri Aug 02 16:42:32 2019 +0100
+++ b/view/Pane.cpp	Fri Aug 02 16:44:32 2019 +0100
@@ -388,12 +388,9 @@
                 if (ModelById::isa<WaveFileModel>(modelId)) {
                     workModelId = modelId;
                 } else {
-                    auto model = ModelById::get(modelId);
-                    if (model) {
-                        ModelId sourceId = model->getSourceModel();
-                        if (ModelById::isa<WaveFileModel>(sourceId)) {
-                            workModelId = sourceId;
-                        }
+                    ModelId sourceId = (*vi)->getSourceModel();
+                    if (ModelById::isa<WaveFileModel>(sourceId)) {
+                        workModelId = sourceId;
                     }
                 }
             }