]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Additional corrections for IPAL19178.
authormkr <mkr@opencascade.com>
Thu, 13 Mar 2008 07:49:31 +0000 (07:49 +0000)
committermkr <mkr@opencascade.com>
Thu, 13 Mar 2008 07:49:31 +0000 (07:49 +0000)
src/VVTK/VVTK_PickingDlg.cxx

index 76fead72a22f344af70b91d5c38c956d5e70c394..75670122be675f69950d0fa04f6bd852d668edbe 100644 (file)
@@ -676,26 +676,26 @@ void VVTK_PickingDlg::onClickApply()
 void VVTK_PickingDlg::onClickClose()
 {
   SelectorHelper aHelper( myInteractor );
-  if ( !aHelper.get() )
-    return;
-
-  const TColStd_IndexedMapOfInteger& aMapIndex = aHelper.myMapIndex;
-  if ( aMapIndex.Extent() != 1 )
-    return;
+  if ( aHelper.get() )
+  {
+    const TColStd_IndexedMapOfInteger& aMapIndex = aHelper.myMapIndex;
+    if ( aMapIndex.Extent() == 1 )
+    {
+      int anObjId = aHelper.myMapIndex(1);
+      VISU::TGaussPointID aGaussPointID = aHelper.myPipeLine->GetObjID( anObjId );
+      VISU::TCellID aCellID = aGaussPointID.first;
+      VISU::TLocalPntID aLocalPntID = aGaussPointID.second;
+      
+      VISU::PGaussPtsIDMapper anIDMapper = aHelper.myPipeLine->GetGaussPtsIDMapper();
+      vtkIdType anObjVtkId = anIDMapper->GetVTKID( VISU::TGaussPointID( aCellID, aLocalPntID ) );
+      if ( anObjVtkId >= 0 )
+      {
+       aHelper.myActor->Highlight( false );
+       aHelper.myMapIndex.Clear();
+      }
+    }
+  }
   
-  int anObjId = aHelper.myMapIndex(1);
-  VISU::TGaussPointID aGaussPointID = aHelper.myPipeLine->GetObjID( anObjId );
-  VISU::TCellID aCellID = aGaussPointID.first;
-  VISU::TLocalPntID aLocalPntID = aGaussPointID.second;
-
-  VISU::PGaussPtsIDMapper anIDMapper = aHelper.myPipeLine->GetGaussPtsIDMapper();
-  vtkIdType anObjVtkId = anIDMapper->GetVTKID( VISU::TGaussPointID( aCellID, aLocalPntID ) );
-  if ( anObjVtkId < 0 )
-    return;
-
-  aHelper.myActor->Highlight( false );
-  aHelper.myMapIndex.Clear();
-
   reject();
 }