]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for Bug NPAL16809
authorapo <apo@opencascade.com>
Wed, 14 Nov 2007 08:14:29 +0000 (08:14 +0000)
committerapo <apo@opencascade.com>
Wed, 14 Nov 2007 08:14:29 +0000 (08:14 +0000)
   EDF 562 VISU Gauss Picking, having an alphanumeric selection

src/VTKViewer/VTKViewer_AppendFilter.cxx

index f1ffea23919df7af985118954ad3061a17005478..699941a2919cfc45bdc67ab4c17b98ab45c60cd3 100644 (file)
@@ -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);
 }