]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To improve ELNO related selection BR_ELNO_visualization
authorapo <apo@opencascade.com>
Mon, 26 May 2008 15:01:53 +0000 (15:01 +0000)
committerapo <apo@opencascade.com>
Mon, 26 May 2008 15:01:53 +0000 (15:01 +0000)
src/CONVERTOR/VISU_ConvertorUtils.cxx
src/CONVERTOR/VISU_ConvertorUtils.hxx
src/VISUGUI/VisuGUI_Selection.cxx

index 53a2708a8a5f6a40d416ce9591fbdc9ee0f65866..78c84a035a8db2e9d9bb25d666687d8da2caa3e3 100644 (file)
@@ -233,6 +233,24 @@ namespace VISU
     return aDataSetAttributes->GetArray("VISU_FIELD") != NULL;
   }
 
+  //---------------------------------------------------------------
+  bool 
+  IsElnoData(vtkDataSet* theDataSet)
+  {
+    theDataSet->Update();
+
+    if ( vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData() )
+      if ( aDataSetAttributes->GetArray( "ELNO_FIELD" )  != NULL )
+       return true;
+
+    if ( vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData() )
+      if ( aDataSetAttributes->GetArray( "ELNO_POINT_COORDS" )  != NULL )
+       return true;
+
+    return false;
+  }
+
+
   //---------------------------------------------------------------
   bool 
   IsDataOnElnoCells(vtkDataSet* theDataSet)
index 0b19a68dc580eb0929a7c4dcccf82a7ac866c457..cb2da44406ca6337473955e489bcc00a6a064f84 100644 (file)
@@ -90,6 +90,12 @@ namespace VISU
   bool 
   IsDataOnCells(vtkDataSet* theDataSet);
 
+  //---------------------------------------------------------------
+  VISU_CONVERTOR_EXPORT
+  bool 
+  IsElnoData(vtkDataSet* theDataSet);
+
+
   //---------------------------------------------------------------
   VISU_CONVERTOR_EXPORT
   bool 
index bb92fe97ebe66ab7c9bb98aa73f8aaab237acded..53b40711f1ee79e6585fc2bdb0c94bd00e0a0dc6 100644 (file)
@@ -54,6 +54,8 @@
 #include "SVTK_ViewWindow.h"
 #include "SVTK_Selector.h"
 
+#include "VISU_ConvertorUtils.hxx"
+
 #include "utilities.h"
 
 // OCCT Includes
@@ -450,8 +452,13 @@ void VisuGUI_SelectionDlg::onSelectionEvent() {
             myYValLbl->setText( QString::number( aCoord[1] ) );
             myZValLbl->setText( QString::number( aCoord[2] ) );
             myIDValLbl->setText( QString::number(anID) );
-            myScalarValLbl->setText(getValue(aPntData, aVTKID));
-            myVectorValLbl->setText(getVector(aPntData, aVTKID));
+           if ( !VISU::IsElnoData( aDataSet ) ) {
+             myScalarValLbl->setText( getValue( aPntData, aVTKID ) );
+             myVectorValLbl->setText( getVector( aPntData, aVTKID ) );
+           } else {
+             myScalarValLbl->setText( "< ELNO data >" );
+             myVectorValLbl->setText( "< ELNO data >" );
+           }
 
            const VISU::PIDMapper& aMapper = aPrs3d->GetPipeLine()->GetIDMapper();
            VISU::TStructuredId aStructuredId = aMapper->GetIndexesOfNode(anID);