diff framework/MainWindowBase.cpp @ 183:da514e36839a

* If, when a model is removed from a layer, it is found that the only remaining layers representing that model are ruler layers, then stop playing the model (probable fix to bug reported by Tim Crawford)
author Chris Cannam
date Wed, 23 Sep 2009 11:19:43 +0000
parents 84b2c1a4984a
children f701c0c686e5
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Mon Sep 21 12:46:20 2009 +0000
+++ b/framework/MainWindowBase.cpp	Wed Sep 23 11:19:43 2009 +0000
@@ -2646,7 +2646,9 @@
                 if (!pane) continue;
                 for (int j = 0; j < pane->getLayerCount(); ++j) {
                     Layer *pl = pane->getLayer(j);
-                    if (pl && (pl->getModel() == model)) {
+                    if (pl &&
+                        !dynamic_cast<TimeRulerLayer *>(pl) &&
+                        (pl->getModel() == model)) {
                         found = true;
                         break;
                     }