From cfe9b8224c6909463e5b9bc3f007ec811914fb81 Mon Sep 17 00:00:00 2001 From: pkv Date: Tue, 11 Oct 2005 12:07:33 +0000 Subject: [PATCH] fix for the Bug GVIEW10171 --- src/OBJECT/VISU_GaussPtsAct.cxx | 21 +++++++++++++++++++-- src/OBJECT/VISU_GaussPtsAct.h | 4 ++++ 2 files changed, 23 insertions(+), 2 deletions(-) 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: //---------------------------------------------------------------------------- -- 2.39.2