mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-13 00:07:24 +00:00
using same single instance of action searcher
This commit is contained in:
parent
72b05e717e
commit
a28309b6bc
@ -359,7 +359,7 @@ public:
|
||||
QMenu* rasterLayerMenu() { return filterMenuRasterLayer; }
|
||||
|
||||
private:
|
||||
ActionSearcher wama;
|
||||
ActionSearcher& searcher;
|
||||
//////// ToolBars ///////////////
|
||||
QToolBar* mainToolBar;
|
||||
QToolBar* decoratorToolBar;
|
||||
|
||||
@ -46,13 +46,14 @@
|
||||
|
||||
QProgressBar *MainWindow::qb;
|
||||
|
||||
MainWindow::MainWindow():
|
||||
httpReq(this),
|
||||
gpumeminfo(NULL),
|
||||
defaultGlobalParams(meshlab::defaultGlobalParameterList()),
|
||||
lastUsedDirectory(QDir::home()),
|
||||
PM(meshlab::pluginManagerInstance()),
|
||||
_currviewcontainer(NULL)
|
||||
MainWindow::MainWindow() :
|
||||
searcher(meshlab::actionSearcherInstance()),
|
||||
httpReq(this),
|
||||
gpumeminfo(NULL),
|
||||
defaultGlobalParams(meshlab::defaultGlobalParameterList()),
|
||||
lastUsedDirectory(QDir::home()),
|
||||
PM(meshlab::pluginManagerInstance()),
|
||||
_currviewcontainer(NULL)
|
||||
{
|
||||
QSettings settings;
|
||||
//toDelete plugins, flagged in the last session
|
||||
@ -650,7 +651,7 @@ void MainWindow::createMenus()
|
||||
{
|
||||
initSearchEngine();
|
||||
int longest = longestActionWidthInAllMenus();
|
||||
searchMenu = new SearchMenu(wama, 15, searchButton, longest);
|
||||
searchMenu = new SearchMenu(searcher, 15, searchButton, longest);
|
||||
searchButton->setMenu(searchMenu);
|
||||
connect(searchShortCut, SIGNAL(activated()), searchButton, SLOT(openMenu()));
|
||||
}
|
||||
@ -658,22 +659,22 @@ void MainWindow::createMenus()
|
||||
|
||||
void MainWindow::initSearchEngine()
|
||||
{
|
||||
wama.clear();
|
||||
searcher.clear();
|
||||
for (const auto& p : PM.filterPluginIterator()){
|
||||
for (QAction* act : p->actions())
|
||||
wama.addAction(act);
|
||||
searcher.addAction(act);
|
||||
}
|
||||
for (const auto& p : PM.editPluginFactoryIterator()){
|
||||
for (QAction* act : p->actions())
|
||||
wama.addAction(act);
|
||||
searcher.addAction(act);
|
||||
}
|
||||
for (const auto& p : PM.renderPluginIterator()){
|
||||
for (QAction* act : p->actions())
|
||||
wama.addAction(act);
|
||||
searcher.addAction(act);
|
||||
}
|
||||
for (const auto& p : PM.decoratePluginIterator()){
|
||||
for (QAction* act : p->actions())
|
||||
wama.addAction(act);
|
||||
searcher.addAction(act);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user