]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for bug IPAL19512 : Qt4 porting: Error message is shown after selection of Gauss...
authormkr <mkr@opencascade.com>
Mon, 21 Apr 2008 12:41:32 +0000 (12:41 +0000)
committermkr <mkr@opencascade.com>
Mon, 21 Apr 2008 12:41:32 +0000 (12:41 +0000)
src/CONVERTOR/VISU_ConvertorUtils.cxx
src/OBJECT/VISU_GaussPtsAct.cxx
src/VISUGUI/VisuGUI_Selection.cxx

index 85f49eecc761a73cf75f0461d1c8644263ee23fd..a4cee79f990bb82bfbe4b74009b62b613584c184 100644 (file)
@@ -353,7 +353,8 @@ namespace VISU
   GetNodeCoord(vtkDataSet *theDataSet, vtkIdType theObjID)
   {
     vtkIdType aVTKID = GetNodeVTKID(theDataSet, theObjID);
-    return theDataSet->GetPoint(aVTKID);
+    if ( aVTKID >= 0 ) return theDataSet->GetPoint(aVTKID);
+    return 0;
   }
 
 
index 045da66fbe5937c94086011600c6eb45ce46b96b..8ca84bc930aae89eb284c4675ed47110fa0e351c 100644 (file)
@@ -967,7 +967,7 @@ VISU_GaussPtsAct
   vtkFloatingPointType aFocalPnt[3];
   aCamera->GetFocalPoint(aFocalPnt);
 
-  if ( CheckIsSameVector( aNodeCoord, aFocalPnt, 3 ) ) 
+  if ( !aNodeCoord || CheckIsSameVector( aNodeCoord, aFocalPnt, 3 ) ) 
     return;
 
   // FlyTo
index 044de3752bfb34da9ca7a4cc45d3efc10cd98eed..20462021d223c6057f037a9a39b1598be5556d4a 100644 (file)
@@ -484,31 +484,33 @@ void VisuGUI_SelectionDlg::onSelectionEvent() {
         switch (aType) {
         case 0:
           {
-            vtkFloatingPointType* 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(anID) );
-            myScalarValLbl->setText(getValue(aPntData, aVTKID));
-            myVectorValLbl->setText(getVector(aPntData, aVTKID));
-           //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-           const VISU::PIDMapper& aMapper = aPrs3d->GetPipeLine()->GetIDMapper();
-           VISU::TIdTypeVector aVec = aMapper->GetIndexesOfNode(anID);
-           switch(aVec.size()){
-             case 3:
-               myKValLbl->setText(QString::number(aVec[2]));
-             case 2:
-               myJValLbl->setText(QString::number(aVec[1]));
-             case 1:
-               myIValLbl->setText(QString::number(aVec[0]));
-               break;
-           default:
-             myIValLbl->setText("-");
-             myJValLbl->setText("-");
-             myKValLbl->setText("-");
+           if(aVTKID >= 0){
+             vtkFloatingPointType* aCoord = anVISUActor->GetNodeCoord(anID);
+             myXValLbl->setText( QString::number( aCoord[0] ) );
+             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));
+             //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+             const VISU::PIDMapper& aMapper = aPrs3d->GetPipeLine()->GetIDMapper();
+             VISU::TIdTypeVector aVec = aMapper->GetIndexesOfNode(anID);
+             switch(aVec.size()){
+               case 3:
+                 myKValLbl->setText(QString::number(aVec[2]));
+               case 2:
+                 myJValLbl->setText(QString::number(aVec[1]));
+               case 1:
+                 myIValLbl->setText(QString::number(aVec[0]));
+                 break;
+               default:
+                 myIValLbl->setText("-");
+                 myJValLbl->setText("-");
+                 myKValLbl->setText("-");
+             }
+             //ENK: 23.11.2006
            }
-           //ENK: 23.11.2006
           }
           break;
         case 1: