From 9db9beedc7eb1504a88d7b21685dde7e896696af Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 1 Sep 2005 05:30:06 +0000 Subject: [PATCH] To introduce ID's mapping --- src/VISUGUI/VisuGUI_Selection.cxx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) 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(); -- 2.39.2