diff --git a/src/meshlab/mainwindow_Init.cpp b/src/meshlab/mainwindow_Init.cpp index a4e894380..0f0e5a9cc 100644 --- a/src/meshlab/mainwindow_Init.cpp +++ b/src/meshlab/mainwindow_Init.cpp @@ -24,6 +24,9 @@ History $Log$ +Revision 1.7 2005/12/03 23:25:10 ggangemi +re-added meshcolorizeplugin support + Revision 1.6 2005/12/03 19:05:39 davide_portelli Added About menu. @@ -510,6 +513,12 @@ void MainWindow::loadPlugins() // //} // NEW VERSION + + + MeshColorizeInterface *iColor = qobject_cast(plugin); + if (iColor) + addToMenu(iColor->actions(), colorModeMenu, SLOT(applyColorMode())); + MeshRenderInterface *iDummy = qobject_cast(plugin); if(iDummy) addToMenu(iDummy->actions(),renderMenu,SLOT(applyRenderMode())); @@ -525,6 +534,7 @@ void MainWindow::addToMenu(QList actionList, QMenu *menu, const char foreach (QAction *a, actionList) { connect(a,SIGNAL(triggered()),this,slot); + a->setCheckable(true); menu->addAction(a); } // OLD LOOP CORE diff --git a/src/meshlab/mainwindow_RunTime.cpp b/src/meshlab/mainwindow_RunTime.cpp index 838fe740f..cbe6abf74 100644 --- a/src/meshlab/mainwindow_RunTime.cpp +++ b/src/meshlab/mainwindow_RunTime.cpp @@ -24,6 +24,9 @@ History $Log$ +Revision 1.10 2005/12/03 23:25:40 ggangemi +re-added meshcolorizeplugin support + Revision 1.9 2005/12/03 21:29:34 davide_portelli Correct bug @@ -373,13 +376,14 @@ void MainWindow::applyColorMode() { QAction *action = qobject_cast(sender()); MeshColorizeInterface *iColor = qobject_cast(action->parent()); -// OLD VERSION iColor->Compute(action->text(),*(GLA()->mm ), GLA()); - - // when apply colorize we have to switch to a different color mode!! - // Still not working - GLA()->setColorMode(GLW::CMPerVert); - - GLA()->log.Log(GLLogStream::Info,"Applied colorize %s",action->text().toLocal8Bit().constData());// .data()); + iColor->Compute(action,*(GLA()->mm ), GLA()); + if (action->isChecked()) { + action->setChecked(true); + GLA()->log.Log(GLLogStream::Info,"Applied colorize %s",action->text().toLocal8Bit().constData()); + } else { + action->setChecked(false); + GLA()->log.Log(GLLogStream::Info,"Turning off colorize %s",action->text().toLocal8Bit().constData()); + } } void MainWindow::applyImportExport()