Commit 26af2896 authored by Ken Martin's avatar Ken Martin Committed by Code Review
Browse files

Merge topic 'picking_fix' into master

598a8347 Minor fix to the picking code
parents afb7b56c 598a8347
......@@ -1654,9 +1654,9 @@ vtkIdType vtkOpenGLPolyDataMapper::GetConvertedPickValue(vtkIdType idIn, int fie
vtkIdType numCells = (representation == VTK_POINTS) ? npts : (npts - 1);
if (localId < cellCount + numCells)
{
return localId + offset;
return idIn + offset + cellCount - localId;
}
offset = offset + numCells - 1;
offset = offset + 1 - numCells;
cellCount += numCells;
}
localId -= (this->Lines.indexCount/2);
......@@ -1674,9 +1674,9 @@ vtkIdType vtkOpenGLPolyDataMapper::GetConvertedPickValue(vtkIdType idIn, int fie
(representation == VTK_WIREFRAME) ? npts : (npts - 2);
if (localId < cellCount + numCells)
{
return localId + offset;
return idIn + offset + cellCount - localId;
}
offset = offset + numCells - 1;
offset = offset + 1 - numCells;
cellCount += numCells;
}
localId -= (this->Tris.indexCount/3);
......@@ -1685,7 +1685,7 @@ vtkIdType vtkOpenGLPolyDataMapper::GetConvertedPickValue(vtkIdType idIn, int fie
// for strips the cell maps exactly, easy peasy
if (static_cast<size_t>(localId) < this->TriStrips.indexCount)
{
return localId;
return idIn + offset;
}
return 0;
}
......
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