diff main/MainWindow.cpp @ 287:0842fc8a0db0

* Make it possible to Find a Transform even when no file loaded (it just won't be run)
author Chris Cannam
date Thu, 20 Nov 2008 12:21:33 +0000
parents 0662104e6605
children 5228aaccfb1b
line wrap: on
line diff
--- a/main/MainWindow.cpp	Wed Nov 19 14:55:17 2008 +0000
+++ b/main/MainWindow.cpp	Thu Nov 20 12:21:33 2008 +0000
@@ -1444,7 +1444,7 @@
     action->setStatusTip(tr("Search for a transform from the installed plugins, by name or description"));
     action->setShortcut(tr("Ctrl+M"));
     connect(action, SIGNAL(triggered()), this, SLOT(findTransform()));
-    connect(this, SIGNAL(canAddLayer(bool)), action, SLOT(setEnabled(bool)));
+//    connect(this, SIGNAL(canAddLayer(bool)), action, SLOT(setEnabled(bool)));
     m_keyReference->registerShortcut(action);
     m_transformsMenu->addAction(action);
     m_rightButtonTransformsMenu->addAction(action);
@@ -3102,7 +3102,10 @@
     }
     TransformId transform = finder->getTransform();
     delete finder;
-    addLayer(transform);
+    
+    if (getMainModel() != 0 && m_paneStack->getCurrentPane() != 0) {
+        addLayer(transform);
+    }
 }
 
 void