]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To improve update outside presentation fcuntionality
authorapo <apo@opencascade.com>
Mon, 3 Oct 2005 06:26:53 +0000 (06:26 +0000)
committerapo <apo@opencascade.com>
Mon, 3 Oct 2005 06:26:53 +0000 (06:26 +0000)
src/VVTK/VVTK_SegmentationCursorDlg.cxx
src/VVTK/VVTK_SegmentationCursorDlg.h

index 1f295ccfdf6de1d7fea55132978c8ce2e87aa0ea..7033e2bbe3573d95ddbb5716e80e2ffd284b4a92 100644 (file)
@@ -47,7 +47,6 @@ using namespace std;
 VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const char* name )
   :QDialog( parent, name, false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
    myEventCallbackCommand( vtkCallbackCommand::New() ),
-   myActorCollection( vtkActorCollection::New() ),
    myOutsideCursorSettings( VISU_OutsideCursorSettings::New() )
 {
   myPriority = 0.0;
@@ -317,16 +316,14 @@ VVTK_SegmentationCursorDlg::~VVTK_SegmentationCursorDlg()
 {
 }
 
-void VVTK_SegmentationCursorDlg::AddActor( VISU_GaussPtsAct* theActor )
+void VVTK_SegmentationCursorDlg::AddActor( VISU_GaussPtsAct1* theActor )
 {
-  myActorCollection->AddItem( theActor );
-
   theActor->SetOutsideCursorSettings( myOutsideCursorSettings.GetPointer() );
 }
 
-void VVTK_SegmentationCursorDlg::RemoveActor( VISU_GaussPtsAct* theActor )
+void VVTK_SegmentationCursorDlg::RemoveActor( VISU_GaussPtsAct1* theActor )
 {
-  myActorCollection->RemoveItem( theActor );
+  theActor->SetOutsideCursorSettings( NULL );
 }
 
 void VVTK_SegmentationCursorDlg::SetWidget( VISU_ImplicitFunctionWidget* theWidget )
@@ -525,13 +522,7 @@ void VVTK_SegmentationCursorDlg::ApplyOutsideCursor()
   aColor[2] = aButtonColor.blue() / 255.0;
   myOutsideCursorSettings->SetColor( aColor );
 
-  vtkActor* anActor;
-  for( myActorCollection->InitTraversal(); ( anActor = myActorCollection->GetNextActor() ) != 0; )
-  {
-    VISU_GaussPtsAct* aGPActor = dynamic_cast<VISU_GaussPtsAct*>( anActor );
-    if( aGPActor )
-      aGPActor->UpdateOutsideCursorSettings();
-  }
+  myOutsideCursorSettings->InvokeEvent(vtkCommand::ModifiedEvent,NULL);
 }
 
 void VVTK_SegmentationCursorDlg::onClickClose()
index 6694a38de444e61231b5e07e91cf80a2b0891a90..910b40aca4176873dd0c51ddf5e2e3f139ab9d78 100644 (file)
@@ -30,7 +30,7 @@ class QVBox;
 class QtxAction;
 class QtxDblSpinBox;
 
-class VISU_GaussPtsAct;
+class VISU_GaussPtsAct1;
 class VISU_OutsideCursorSettings;
 class VISU_ImplicitFunctionWidget;
 
@@ -42,8 +42,8 @@ public:
   VVTK_SegmentationCursorDlg( QWidget* parent = 0, const char* name = 0 );
   ~VVTK_SegmentationCursorDlg();
 
-  void             AddActor( VISU_GaussPtsAct* );
-  void             RemoveActor( VISU_GaussPtsAct* );
+  void             AddActor( VISU_GaussPtsAct1* );
+  void             RemoveActor( VISU_GaussPtsAct1* );
 
   void             SetWidget( VISU_ImplicitFunctionWidget* );
   void             SetAction( QtxAction* theAction ) { myAction = theAction; }
@@ -116,7 +116,6 @@ private:
   QString          myMainTexture;
   QString          myAlphaTexture;
 
-  vtkSmartPointer<vtkActorCollection> myActorCollection;
   vtkSmartPointer<VISU_OutsideCursorSettings> myOutsideCursorSettings;
 };