From: apo Date: Wed, 14 Nov 2007 08:14:29 +0000 (+0000) Subject: Fix for Bug NPAL16809 X-Git-Tag: V3_2_9rc1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8369955947daad0883ad6ae57ed022ac584b784a;p=modules%2Fgui.git Fix for Bug NPAL16809 EDF 562 VISU Gauss Picking, having an alphanumeric selection --- diff --git a/src/VTKViewer/VTKViewer_AppendFilter.cxx b/src/VTKViewer/VTKViewer_AppendFilter.cxx index f1ffea239..699941a29 100644 --- a/src/VTKViewer/VTKViewer_AppendFilter.cxx +++ b/src/VTKViewer/VTKViewer_AppendFilter.cxx @@ -142,13 +142,17 @@ namespace vtkIdType theInputDataSetID, const VTKViewer_AppendFilter::TVectorIds& theRanges) { - theInputID = theInputDataSetID = -1; - vtkIdType aNbInputs = theRanges.size(); - if(theInputDataSetID < 0 || theInputDataSetID >= aNbInputs) + if ( theInputDataSetID < 0 || theInputDataSetID >= aNbInputs ) return -1; - vtkIdType aStartId = theRanges[theInputDataSetID]; + if ( theInputDataSetID == 0 ) + return theInputID; + + vtkIdType aStartId = theRanges[theInputDataSetID - 1]; + if ( theInputID < 0 || theInputID > theRanges[theInputDataSetID] - aStartId ) + return -1; + return aStartId + theInputID; } } @@ -168,11 +172,8 @@ VTKViewer_AppendFilter vtkIdType VTKViewer_AppendFilter ::GetCellOutputID(vtkIdType theInputID, - vtkIdType theInputDataSetID) + vtkIdType theInputDataSetID) { - if(GetSharedPointsDataSet()) - return theInputID; - return GetOutputID(theInputID,theInputDataSetID,myCellRanges); }