From d18c0c0aeea8bd3262571aee343e63e355b405c2 Mon Sep 17 00:00:00 2001 From: Guido Ranzuglia granzuglia Date: Tue, 25 Oct 2016 20:26:48 +0000 Subject: [PATCH] - avoiding color mask updating if edit quality mapper cannot be applied cause mesh has not per vertex quality attribute --- src/meshlabplugins/edit_quality/qualitymapper.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/meshlabplugins/edit_quality/qualitymapper.cpp b/src/meshlabplugins/edit_quality/qualitymapper.cpp index 76b475721..9fcc439af 100644 --- a/src/meshlabplugins/edit_quality/qualitymapper.cpp +++ b/src/meshlabplugins/edit_quality/qualitymapper.cpp @@ -102,9 +102,12 @@ void QualityMapperPlugin::EndEdit(MeshModel & m, GLArea *,MLSceneGLSharedDataCon void QualityMapperPlugin::suggestedRenderingData(MeshModel & m, MLRenderingData& dt) { - for (MLRenderingData::PRIMITIVE_MODALITY pr = MLRenderingData::PRIMITIVE_MODALITY(0); pr < MLRenderingData::PR_ARITY; pr = MLRenderingData::next(pr)) - dt.set(pr, MLRenderingData::ATT_NAMES::ATT_VERTCOLOR, true); - m.updateDataMask(MeshModel::MM_VERTCOLOR); + if (m.hasDataMask(MeshModel::MM_VERTQUALITY)) + { + for (MLRenderingData::PRIMITIVE_MODALITY pr = MLRenderingData::PRIMITIVE_MODALITY(0); pr < MLRenderingData::PR_ARITY; pr = MLRenderingData::next(pr)) + dt.set(pr, MLRenderingData::ATT_NAMES::ATT_VERTCOLOR, true); + m.updateDataMask(MeshModel::MM_VERTCOLOR); + } } //void QualityMapperPlugin::Decorate(MeshModel&, GLArea*)