]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To introduce ID's mapping
authorapo <apo@opencascade.com>
Thu, 1 Sep 2005 05:30:06 +0000 (05:30 +0000)
committerapo <apo@opencascade.com>
Thu, 1 Sep 2005 05:30:06 +0000 (05:30 +0000)
src/VISUGUI/VisuGUI_Selection.cxx

index b8fa98909ef0be69470f00326c428c90f77afd92..0948023b459d92bb790f3b14a6d4b53536123988 100644 (file)
@@ -414,34 +414,34 @@ void VisuGUI_SelectionDlg::onSelectionEvent() {
       vtkPointData* aPntData = aDataSet->GetPointData();
 
       for (int ind = 1; ind <= aMapIndex.Extent(); ind++) {
-        int aID = aMapIndex(ind);
+        int anID = aMapIndex(ind);
 
         switch (aType) {
         case 0:
           {
-            float aCoord[3];
-            aDataSet->GetPoint(aID, aCoord);
+            float* aCoord = anVISUActor->GetNodeCoord(anID);
+           int aVTKID = anVISUActor->GetNodeVTKID(anID);
             myXValLbl->setText( QString::number( aCoord[0] ) );
             myYValLbl->setText( QString::number( aCoord[1] ) );
             myZValLbl->setText( QString::number( aCoord[2] ) );
-            myIDValLbl->setText( QString::number(aID) );
-            myScalarValLbl->setText(getValue(aPntData, aID));
-            myVectorValLbl->setText(getVector(aPntData, aID));
+            myIDValLbl->setText( QString::number(anID) );
+            myScalarValLbl->setText(getValue(aPntData, aVTKID));
+            myVectorValLbl->setText(getVector(aPntData, aVTKID));
           }
           break;
         case 1:
           {
-            vtkCellData* aData = aDataSet->GetCellData();
-            vtkCell* aCell = anVISUActor->GetElemCell(aID);
-           int aVTKID = anVISUActor->GetNodeVTKID(aID);
+            vtkCellData* aCellData = aDataSet->GetCellData();
+            vtkCell* aCell = anVISUActor->GetElemCell(anID);
+           int aVTKID = anVISUActor->GetElemVTKID(anID);
             if (aCell != NULL) {
               int aNbOfPoints = aCell->GetNumberOfPoints();
               if ( aNbOfPoints <= 1 ) { // Cell is point
                 clearFields();
               } else {
-                myCellIDValLbl->setText( QString::number(aID) );
-                myCellScalarValLbl->setText(getValue(aData, aVTKID));
-                myCellVectorValLbl->setText(getVector(aData, aVTKID));
+                myCellIDValLbl->setText( QString::number(anID) );
+                myCellScalarValLbl->setText(getValue(aCellData, aVTKID));
+                myCellVectorValLbl->setText(getVector(aCellData, aVTKID));
 
                 float* aCoord;
                 vtkIdList *aPointList = aCell->GetPointIds();