From: apo Date: Thu, 1 Sep 2005 05:30:06 +0000 (+0000) Subject: To introduce ID's mapping X-Git-Tag: BR-D5-38-2003_D2005-12-09~54 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9db9beedc7eb1504a88d7b21685dde7e896696af;p=modules%2Fvisu.git To introduce ID's mapping --- diff --git a/src/VISUGUI/VisuGUI_Selection.cxx b/src/VISUGUI/VisuGUI_Selection.cxx index b8fa9890..0948023b 100644 --- a/src/VISUGUI/VisuGUI_Selection.cxx +++ b/src/VISUGUI/VisuGUI_Selection.cxx @@ -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();