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