diff main/MainWindow.cpp @ 27:61259228d029

* More to do with passing around step/blocksize etc from plugin dialog to plugins. Still some puzzling unresolved details.
author Chris Cannam
date Tue, 19 Sep 2006 14:37:06 +0000
parents d88d117e0c34
children 544ab25d2372
line wrap: on
line diff
--- a/main/MainWindow.cpp	Mon Sep 18 16:43:17 2006 +0000
+++ b/main/MainWindow.cpp	Tue Sep 19 14:37:06 2006 +0000
@@ -2790,6 +2790,9 @@
 
     bool needConfiguration = false;
 
+    //!!! actually we should probably always ask for configuration
+    //because we need the execution context
+
     if (factory->isTransformConfigurable(transform)) {
         needConfiguration = true;
     } else {
@@ -2803,21 +2806,23 @@
         }
     }
 
+    PluginTransform::ExecutionContext context(channel);
+
     if (needConfiguration) {
         bool ok =
             factory->getConfigurationForTransform
-            (transform, m_document->getMainModel(), channel, configurationXml);
+            (transform, m_document->getMainModel(), context, configurationXml);
         if (!ok) return;
     }
 
     Layer *newLayer = m_document->createDerivedLayer(transform,
                                                      m_document->getMainModel(),
-                                                     channel,
+                                                     context,
                                                      configurationXml);
 
     if (newLayer) {
         m_document->addLayerToView(pane, newLayer);
-        m_document->setChannel(newLayer, channel);
+        m_document->setChannel(newLayer, context.channel);
     }
 
     updateMenuStates();