- avoided possible synchronization problems

This commit is contained in:
Guido Ranzuglia granzuglia 2016-09-27 04:13:48 +00:00
parent 36d0f25bc9
commit d080206767
2 changed files with 7 additions and 4 deletions

View File

@ -85,9 +85,14 @@ void FilterThread::run()
EnvWrap envwrap(env);
_cur = this;
_success = it->filterInterface->applyFilter(_fname, _md, envwrap, &localCallBack);
for (MeshModel* mm = _md.nextMesh(); mm != NULL; mm = _md.nextMesh(mm))
vcg::tri::Allocator<CMeshO>::CompactEveryVector(mm->cm);
_cur = NULL;
it->filterInterface->glContext->removePerViewRenderindData();
delete it->filterInterface->glContext;
if (it->filterInterface->glContext != NULL)
{
it->filterInterface->glContext->removePerViewRenderindData();
delete it->filterInterface->glContext;
}
}
else
throw MLException("There is not yet support for not-C++ filters.");

View File

@ -1820,8 +1820,6 @@ void MainWindow::executeFilter(MeshLabXMLFilterContainer* mfc,const QMap<QString
void MainWindow::postFilterExecution()
{
for (MeshModel* mm = meshDoc()->nextMesh(); mm != NULL; mm = meshDoc()->nextMesh(mm))
vcg::tri::Allocator<CMeshO>::CompactEveryVector(mm->cm);
emit filterExecuted();
//meshDoc()->renderState().clearState();
qApp->restoreOverrideCursor();