Fix bug when painting selection in mesh view provider
This commit is contained in:
parent
765d887943
commit
bcddb1e950
|
@ -1562,7 +1562,10 @@ void ViewProviderMesh::setSelection(const std::vector<unsigned long>& indices)
|
||||||
rMesh.addFacetsToSelection(indices);
|
rMesh.addFacetsToSelection(indices);
|
||||||
|
|
||||||
// Colorize the selection
|
// Colorize the selection
|
||||||
highlightSelection();
|
if (indices.empty())
|
||||||
|
unhighlightSelection();
|
||||||
|
else
|
||||||
|
highlightSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewProviderMesh::addSelection(const std::vector<unsigned long>& indices)
|
void ViewProviderMesh::addSelection(const std::vector<unsigned long>& indices)
|
||||||
|
@ -1627,7 +1630,7 @@ void ViewProviderMesh::highlightSelection()
|
||||||
const Mesh::MeshObject& rMesh = static_cast<Mesh::Feature*>(pcObject)->Mesh.getValue();
|
const Mesh::MeshObject& rMesh = static_cast<Mesh::Feature*>(pcObject)->Mesh.getValue();
|
||||||
rMesh.getFacetsFromSelection(selection);
|
rMesh.getFacetsFromSelection(selection);
|
||||||
if (selection.empty()) {
|
if (selection.empty()) {
|
||||||
// If no faces are selected then simply return even without
|
// If no faces are selected then simply return even
|
||||||
// without calling unhighlightSelection()
|
// without calling unhighlightSelection()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,7 +160,12 @@ void ViewProviderMeshFaceSet::updateData(const App::Property* prop)
|
||||||
}
|
}
|
||||||
|
|
||||||
showOpenEdges(OpenEdges.getValue());
|
showOpenEdges(OpenEdges.getValue());
|
||||||
highlightSelection();
|
std::vector<unsigned long> selection;
|
||||||
|
mesh->getFacetsFromSelection(selection);
|
||||||
|
if (selection.empty())
|
||||||
|
unhighlightSelection();
|
||||||
|
else
|
||||||
|
highlightSelection();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user