From a2ba99452f88197746fb58d1560c7eaed11fc00e Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 28 Mar 2021 11:27:04 +0200 Subject: [PATCH] Mesh: [skip ci] in ViewProviderMesh::highlightSegments change material binding only if colors list is non-empty --- src/Mod/Mesh/Gui/ViewProvider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Mesh/Gui/ViewProvider.cpp b/src/Mod/Mesh/Gui/ViewProvider.cpp index 1cb57b763f..bf66337d29 100644 --- a/src/Mod/Mesh/Gui/ViewProvider.cpp +++ b/src/Mod/Mesh/Gui/ViewProvider.cpp @@ -2205,7 +2205,7 @@ void ViewProviderMesh::highlightSegments(const std::vector& colors) { const Mesh::MeshObject& rMesh = static_cast(pcObject)->Mesh.getValue(); unsigned long numSegm = rMesh.countSegments(); - if (numSegm == colors.size()) { + if (numSegm > 0 && numSegm == colors.size()) { // Colorize the components pcMatBinding->value = SoMaterialBinding::PER_FACE; int uCtFacets = (int)rMesh.countFacets();