comparison 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
comparison
equal deleted inserted replaced
286:0662104e6605 287:0842fc8a0db0
1442 1442
1443 QAction *action = new QAction(tr("Find a Transform..."), this); 1443 QAction *action = new QAction(tr("Find a Transform..."), this);
1444 action->setStatusTip(tr("Search for a transform from the installed plugins, by name or description")); 1444 action->setStatusTip(tr("Search for a transform from the installed plugins, by name or description"));
1445 action->setShortcut(tr("Ctrl+M")); 1445 action->setShortcut(tr("Ctrl+M"));
1446 connect(action, SIGNAL(triggered()), this, SLOT(findTransform())); 1446 connect(action, SIGNAL(triggered()), this, SLOT(findTransform()));
1447 connect(this, SIGNAL(canAddLayer(bool)), action, SLOT(setEnabled(bool))); 1447 // connect(this, SIGNAL(canAddLayer(bool)), action, SLOT(setEnabled(bool)));
1448 m_keyReference->registerShortcut(action); 1448 m_keyReference->registerShortcut(action);
1449 m_transformsMenu->addAction(action); 1449 m_transformsMenu->addAction(action);
1450 m_rightButtonTransformsMenu->addAction(action); 1450 m_rightButtonTransformsMenu->addAction(action);
1451 1451
1452 setupRecentTransformsMenu(); 1452 setupRecentTransformsMenu();
3100 delete finder; 3100 delete finder;
3101 return; 3101 return;
3102 } 3102 }
3103 TransformId transform = finder->getTransform(); 3103 TransformId transform = finder->getTransform();
3104 delete finder; 3104 delete finder;
3105 addLayer(transform); 3105
3106 if (getMainModel() != 0 && m_paneStack->getCurrentPane() != 0) {
3107 addLayer(transform);
3108 }
3106 } 3109 }
3107 3110
3108 void 3111 void
3109 MainWindow::playSoloToggled() 3112 MainWindow::playSoloToggled()
3110 { 3113 {