Mesh: [skip ci] in ViewProviderMesh::highlightSegments change material binding only if colors list is non-empty

This commit is contained in:
wmayer
2021-03-28 11:27:04 +02:00
parent 1a40cdfd43
commit a2ba99452f

View File

@@ -2205,7 +2205,7 @@ void ViewProviderMesh::highlightSegments(const std::vector<App::Color>& colors)
{
const Mesh::MeshObject& rMesh = static_cast<Mesh::Feature*>(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();