]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
fix for the Bug GVIEW10171
authorpkv <pkv@opencascade.com>
Tue, 11 Oct 2005 12:07:33 +0000 (12:07 +0000)
committerpkv <pkv@opencascade.com>
Tue, 11 Oct 2005 12:07:33 +0000 (12:07 +0000)
src/OBJECT/VISU_GaussPtsAct.cxx
src/OBJECT/VISU_GaussPtsAct.h

index 462f9b2e9868dd153498825ace3494a5dee3952a..29ac4f4708fec54c4f36cc57ce43428a9c0c62bb 100644 (file)
@@ -300,6 +300,7 @@ VISU_GaussPtsAct
     theWidget->AddObserver(vtkCommand::DisableEvent, 
                           myEventCallbackCommand.GetPointer(), 
                           myPriority);
+    
   }
 
   myWidget = theWidget;
@@ -411,7 +412,7 @@ VISU_GaussPtsAct
 
   Modified();
 }
-
+//-------------------------------------------------------------------------
 void 
 VISU_GaussPtsAct
 ::ProcessEvents(vtkObject* vtkNotUsed(theObject), 
@@ -420,10 +421,11 @@ VISU_GaussPtsAct
                void* vtkNotUsed(theCallData))
 {
   if(vtkObject* anObject = reinterpret_cast<vtkObject*>(theClientData))
-    if(VISU_GaussPtsAct* self = dynamic_cast<VISU_GaussPtsAct*>(anObject))
+    if(VISU_GaussPtsAct* self = dynamic_cast<VISU_GaussPtsAct*>(anObject)) 
       self->OnInteractorEvent(theEvent);
 }
 
+//-------------------------------------------------------------------------
 void
 VISU_GaussPtsAct
 ::OnInteractorEvent(unsigned long theEvent)
@@ -455,6 +457,21 @@ VISU_GaussPtsAct
   }
 }
 
+//----------------------------------------------------------------------------
+bool VISU_GaussPtsAct::IsInfinitive()
+{
+  vtkMapper *pMapper =GetMapper();
+  vtkDataSet* pDS=pMapper->GetInput();
+  pDS->Update();
+  int aNb=pDS->GetNumberOfCells();
+  if (aNb<2) {
+    myIsInfinite=true;
+    }
+  else{
+    myIsInfinite=false;
+  }
+  return myIsInfinite;
+}
 
 //----------------------------------------------------------------------------
 bool VISU_GaussPtsAct::PreHighlight(SVTK_Selector* theSelector, 
index 7ddc3f1c0a8f700cf1fb16717789e98635b03f17..4fe5e38b400bdbf38e5940fe76d589e97916fc75 100644 (file)
@@ -183,6 +183,10 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor
   void
   highlight(bool theHighlight, 
            Selection_Mode theSelectionMode);
+  virtual
+  bool
+  IsInfinitive();
 
  protected:
   //----------------------------------------------------------------------------