# HG changeset patch # User Chris Cannam # Date 1227183693 0 # Node ID 0842fc8a0db075e429ad9b0fd0951d09485ab995 # Parent 0662104e6605349783c3c6da8a989ab023f02232 * Make it possible to Find a Transform even when no file loaded (it just won't be run) diff -r 0662104e6605 -r 0842fc8a0db0 main/MainWindow.cpp --- 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