Fix fo IPAL20415 (Error on mouse picking with Shift in 3D viewer if any dialog box is opened)

This commit is contained in:
rnv 2008-10-03 06:56:33 +00:00
parent 043cbb6e60
commit 5555c0e6ec

View File

@ -655,7 +655,7 @@ SMESH_DeviceActor
{
vtkDataSet* aDataSet = myMergeFilter->GetOutput();
vtkIdType anID = myVisualObj->GetNodeVTKId(theObjID);
vtkFloatingPointType* aCoord = aDataSet->GetPoint(anID);
vtkFloatingPointType* aCoord = (anID >= 0) ? aDataSet->GetPoint(anID) : NULL;
if(MYDEBUG) MESSAGE("GetNodeCoord - theObjID = "<<theObjID<<"; anID = "<<anID);
return aCoord;
}
@ -691,7 +691,7 @@ SMESH_DeviceActor
{
vtkDataSet* aDataSet = myVisualObj->GetUnstructuredGrid();
vtkIdType aGridID = myVisualObj->GetElemVTKId(theObjID);
vtkCell* aCell = aDataSet->GetCell(aGridID);
vtkCell* aCell = (aGridID >= 0) ? aDataSet->GetCell(aGridID) : NULL;
if(MYDEBUG)
MESSAGE("GetElemCell - theObjID = "<<theObjID<<"; aGridID = "<<aGridID);
return aCell;