From 296a78dbf46aee1b87dcbfcff1d21f32cb83136b Mon Sep 17 00:00:00 2001 From: Guido Ranzuglia granzuglia Date: Tue, 29 May 2012 13:29:14 +0000 Subject: [PATCH] code has been rearranged just a little bit --- src/meshlab/mainwindow_RunTime.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/meshlab/mainwindow_RunTime.cpp b/src/meshlab/mainwindow_RunTime.cpp index 2bd2261ee..e3e7e86fa 100644 --- a/src/meshlab/mainwindow_RunTime.cpp +++ b/src/meshlab/mainwindow_RunTime.cpp @@ -1132,10 +1132,16 @@ void MainWindow::executeFilter(MeshLabXMLFilterContainer* mfc, EnvWrap& env, boo MeshLabFilterInterface *iFilter = mfc->filterInterface; bool jscode = (mfc->xmlInfo->filterScriptCode(mfc->act->text()) != ""); bool filtercpp = (iFilter != NULL) && (!jscode); - initDocumentMeshRenderState(mfc,env); - initDocumentRasterRenderState(mfc,env); QString fname = mfc->act->text(); + QString postCond = mfc->xmlInfo->filterAttribute(fname,MLXMLElNames::filterPostCond); + QStringList postCondList = postCond.split(QRegExp("\\W+"), QString::SkipEmptyParts); + int postCondMask = MeshLabFilterInterface::convertStringListToMeshElementEnum(postCondList); + if (postCondMask != MeshModel::MM_NONE) + initDocumentMeshRenderState(mfc,env); + + initDocumentRasterRenderState(mfc,env); + qb->show(); if (filtercpp) iFilter->setLog(&meshDoc()->Log); @@ -1145,9 +1151,6 @@ void MainWindow::executeFilter(MeshLabXMLFilterContainer* mfc, EnvWrap& env, boo qApp->setOverrideCursor(QCursor(Qt::WaitCursor)); MainWindow::globalStatusBar()->showMessage("Starting Filter...",5000); //int req=iFilter->getRequirements(action); - QString postCond = mfc->xmlInfo->filterAttribute(fname,MLXMLElNames::filterPostCond); - QStringList postCondList = postCond.split(QRegExp("\\W+"), QString::SkipEmptyParts); - int postCondMask = MeshLabFilterInterface::convertStringListToMeshElementEnum(postCondList); meshDoc()->mm()->updateDataMask(postCondMask); qApp->restoreOverrideCursor();