/*vtkRenderer * theRenderer = */ _wxvtkbaseview->GetRenderer(); // JPRx ??
//Adding the spline
AddSplineActor();
-
AddTextActor();
+
//Adding each control point
if( ifControlPoints )
AddControlPoints();
// ----------------------------------------------------------------------------
void manualViewBaseContour::AddTextActor()
{
- _wxvtkbaseview->GetRenderer()->AddActor2D( _textActor );
+ if(_show_text)
+ {
+ _wxvtkbaseview->GetRenderer()->AddActor2D( _textActor );
+ }
}
// ----------------------------------------------------------------------------
void manualViewBaseContour::RemoveTextActor()
{
- _wxvtkbaseview->GetRenderer()->RemoveActor2D( _textActor );
+ if(_show_text)
+ {
+ _wxvtkbaseview->GetRenderer()->RemoveActor2D( _textActor );
+ }
}
// ----------------------------------------------------------------------------
void manualViewBaseContour::DeleteVtkObjects()
void manualViewBaseContour::SetShowText(bool ok)
{
_show_text = ok;
- if (_show_text==false)
+ if (_show_text==false && _textActor!=NULL)
{
_textActor->SetInput("00");
}