]> Creatis software - cpPlugins.git/blobdiff - plugins/Widgets/SplineWidget.cxx
Line widget added.
[cpPlugins.git] / plugins / Widgets / SplineWidget.cxx
index 1bba488aaa070f470e74a8148d017332f1b4bdbf..057d4e783d10e7407d6ec8ae5a62cc24b997242d 100644 (file)
@@ -7,6 +7,25 @@
 #include <vtkRenderer.h>
 #include <vtkSplineWidget.h>
 
+// -------------------------------------------------------------------------
+void cpPluginsWidgets::SplineWidget::
+Clear( )
+{
+}
+
+// -------------------------------------------------------------------------
+void cpPluginsWidgets::SplineWidget::
+SetEnabled( bool v )
+{
+  auto wdg = this->GetVTK< vtkSplineWidget >( );
+  if( wdg != NULL )
+  {
+    wdg->SetEnabled( v );
+    wdg->GetInteractor( )->Render( );
+
+  } // fi
+}
+
 // -------------------------------------------------------------------------
 cpPluginsWidgets::SplineWidget::
 SplineWidget( )
@@ -49,7 +68,6 @@ _GenerateData( )
   if( this->m_Configured )
   {
     wdg->GetPolyData( this->m_Contour.GetPointer( ) );
-    wdg->Off( );
   }
   else
   {
@@ -111,7 +129,6 @@ _GenerateData( )
       );
     wdg->SetHandleSize( 0.005 );
     wdg->SetNumberOfHandles( 3 );
-    wdg->On( );
     this->m_Configured = true;
 
   } // fi