From: pkv Date: Tue, 11 Oct 2005 12:07:33 +0000 (+0000) Subject: fix for the Bug GVIEW10171 X-Git-Tag: BR-D5-38-2003_D2005-12-10~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cfe9b8224c6909463e5b9bc3f007ec811914fb81;p=modules%2Fvisu.git fix for the Bug GVIEW10171 --- diff --git a/src/OBJECT/VISU_GaussPtsAct.cxx b/src/OBJECT/VISU_GaussPtsAct.cxx index 462f9b2e..29ac4f47 100644 --- a/src/OBJECT/VISU_GaussPtsAct.cxx +++ b/src/OBJECT/VISU_GaussPtsAct.cxx @@ -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(theClientData)) - if(VISU_GaussPtsAct* self = dynamic_cast(anObject)) + if(VISU_GaussPtsAct* self = dynamic_cast(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, diff --git a/src/OBJECT/VISU_GaussPtsAct.h b/src/OBJECT/VISU_GaussPtsAct.h index 7ddc3f1c..4fe5e38b 100644 --- a/src/OBJECT/VISU_GaussPtsAct.h +++ b/src/OBJECT/VISU_GaussPtsAct.h @@ -183,6 +183,10 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_Actor void highlight(bool theHighlight, Selection_Mode theSelectionMode); + + virtual + bool + IsInfinitive(); protected: //----------------------------------------------------------------------------