]> Creatis software - cpPlugins.git/blobdiff - plugins/Widgets/SplineWidget.cxx
PolyLine updated.
[cpPlugins.git] / plugins / Widgets / SplineWidget.cxx
index 1bba488aaa070f470e74a8148d017332f1b4bdbf..a1b153885924ac396e6d634f2ea62cf8d6b6cdca 100644 (file)
@@ -7,6 +7,39 @@
 #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
+}
+
+// -------------------------------------------------------------------------
+bool cpPluginsWidgets::SplineWidget::
+GetEnabled( ) const
+{
+  auto wdg = this->GetVTK< const vtkSplineWidget >( );
+  if( wdg != NULL )
+  {
+    vtkSplineWidget* w = const_cast< vtkSplineWidget* >( wdg );
+    return( w->GetEnabled( ) != 0 );
+  }
+  else
+    return( false );
+}
+
 // -------------------------------------------------------------------------
 cpPluginsWidgets::SplineWidget::
 SplineWidget( )
@@ -49,7 +82,6 @@ _GenerateData( )
   if( this->m_Configured )
   {
     wdg->GetPolyData( this->m_Contour.GetPointer( ) );
-    wdg->Off( );
   }
   else
   {
@@ -111,7 +143,6 @@ _GenerateData( )
       );
     wdg->SetHandleSize( 0.005 );
     wdg->SetNumberOfHandles( 3 );
-    wdg->On( );
     this->m_Configured = true;
 
   } // fi