Commit 4f3da68d authored by Max Lyon's avatar Max Lyon

Fixed crash in propert vis that occured when trying to visualize a vector as color after clearing.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15863 383ad7c9-94d9-4d36-a494-682f7c89f535
parent ea0193a4
......@@ -99,6 +99,8 @@ void OMPropertyVisualizerVector<MeshT>::visualizeFaceProp()
if (w->vectors_edges_rb->isChecked()) visualizeFacePropOnEdges();
else if (w->vectors_colors_rb->isChecked())
{
if ( !OMPropertyVisualizer<MeshT>::mesh->has_face_colors() )
OMPropertyVisualizer<MeshT>::mesh->request_face_colors();
visualizeVectorAsColorForEntity<OpenMesh::FPropHandleT<typename MeshT::Point> >(
OMPropertyVisualizer<MeshT>::mesh,
OMPropertyVisualizer<MeshT>::mesh->faces_begin(),
......@@ -115,6 +117,8 @@ void OMPropertyVisualizerVector<MeshT>::visualizeEdgeProp()
VectorWidget* w = (VectorWidget*)PropertyVisualizer::widget;
if (w->vectors_colors_rb->isChecked())
{
if ( !OMPropertyVisualizer<MeshT>::mesh->has_edge_colors() )
OMPropertyVisualizer<MeshT>::mesh->request_edge_colors();
MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh;
if ( !mesh->has_edge_colors() )
mesh->request_edge_colors();
......@@ -130,6 +134,8 @@ void OMPropertyVisualizerVector<MeshT>::visualizeHalfedgeProp()
VectorWidget* w = (VectorWidget*)PropertyVisualizer::widget;
if (w->vectors_colors_rb->isChecked())
{
if ( !OMPropertyVisualizer<MeshT>::mesh->has_halfedge_colors() )
OMPropertyVisualizer<MeshT>::mesh->request_halfedge_colors();
MeshT* mesh = OMPropertyVisualizer<MeshT>::mesh;
if ( ! mesh->has_halfedge_colors() )
mesh->request_halfedge_colors();
......@@ -145,6 +151,8 @@ void OMPropertyVisualizerVector<MeshT>::visualizeVertexProp()
VectorWidget* w = (VectorWidget*)PropertyVisualizer::widget;
if (w->vectors_colors_rb->isChecked())
{
if ( !OMPropertyVisualizer<MeshT>::mesh->has_vertex_colors() )
OMPropertyVisualizer<MeshT>::mesh->request_vertex_colors();
visualizeVectorAsColorForEntity<OpenMesh::VPropHandleT<typename MeshT::Point> >(
OMPropertyVisualizer<MeshT>::mesh,
OMPropertyVisualizer<MeshT>::mesh->vertices_begin(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment