Commit b4fa4cb8 authored by David Gobbi's avatar David Gobbi

BUG: Add "prop" to the pick list, not the "imageActor" since it might just be...

BUG: Add "prop" to the pick list, not the "imageActor" since it might just be one part of an assembly.  This is a fix to the original imageActor picking code that I committed to vtkPicker around five years ago.
parent d302294a
......@@ -35,7 +35,7 @@
#include "vtkPoints.h"
#include "vtkExtractSelectedFrustum.h"
vtkCxxRevisionMacro(vtkAreaPicker, "1.18");
vtkCxxRevisionMacro(vtkAreaPicker, "1.19");
vtkStandardNewMacro(vtkAreaPicker);
//--------------------------------------------------------------------------
......@@ -294,7 +294,7 @@ int vtkAreaPicker::PickProps(vtkRenderer *renderer)
{
if ( ! this->Prop3Ds->IsItemPresent(prop) )
{
this->Prop3Ds->AddItem(imageActor);
this->Prop3Ds->AddItem(static_cast<vtkProp3D *>(prop));
//cerr << "picked an imageactor" << endl;
if (dist < mindist) //new nearest, remember it
{
......
......@@ -35,7 +35,7 @@
#include "vtkPlane.h"
#include "vtkPoints.h"
vtkCxxRevisionMacro(vtkRenderedAreaPicker, "1.10");
vtkCxxRevisionMacro(vtkRenderedAreaPicker, "1.11");
vtkStandardNewMacro(vtkRenderedAreaPicker);
//--------------------------------------------------------------------------
......@@ -127,16 +127,9 @@ int vtkRenderedAreaPicker::AreaPick(double x0, double y0, double x1, double y1,
{
propCandidate = path->GetLastNode()->GetViewProp();
pickable = this->TypeDecipher(propCandidate, &imageActor, &mapper);
if ( pickable && !this->Prop3Ds->IsItemPresent(propCandidate) )
if ( pickable && !this->Prop3Ds->IsItemPresent(prop) )
{
if (mapper)
{
this->Prop3Ds->AddItem(static_cast<vtkProp3D *>(prop));
}
else if (imageActor)
{
this->Prop3Ds->AddItem(imageActor);
}
this->Prop3Ds->AddItem(static_cast<vtkProp3D *>(prop));
}
}
}
......
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