From 917efb35310973ce696b887dc1701f0cd453d91d Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Thu, 30 Apr 2009 14:21:15 +0000 Subject: [PATCH] BUG text contour --- .../src/interface/wxWindows/manualContour.cpp | 16 ++++++---------- .../src/interface/wxWindows/manualContour.h | 4 ++-- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp b/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp index 987cfa5..e8bd527 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/manualContour.cpp @@ -1524,7 +1524,6 @@ void manualViewContour::RefreshContour() // virtual // ---------------------------------------------------------------------------- void manualViewContour::RefreshText() // virtual { - if ((_textActor!=NULL) && ( _textActor->GetProperty()->GetOpacity()!=0 )){ int size = GetNumberOfPoints(); char text[50]; @@ -2895,7 +2894,7 @@ void manualViewBaseContour::ConstructVTKObjects() // Text _textActor = vtkTextActor::New(); // _textActor->SetDisplayPosition(200, 200); - _textActor->SetInput(""); + _textActor->SetInput("00"); // Set coordinates to match the old vtkScaledTextActor default value // _textActor->GetPosition2Coordinate()->SetCoordinateSystemToNormalizedViewport(); // _textActor->GetPosition2Coordinate()->SetValue( 0.2 , 0.2 ); @@ -3239,7 +3238,7 @@ void manualViewBaseContour::Refresh() // virtual void manualViewBaseContour::RefreshText() // virtual { if( _textActor!=NULL) - _textActor -> SetInput(" "); + _textActor -> SetInput("00"); } // ---------------------------------------------------------------------------- void manualViewBaseContour::SetColorNormalContour(double r, double g, double b) @@ -3481,9 +3480,8 @@ void manualViewBaseContour::SetVisible(bool ok) { opacity=1; } else { - opacity=0; + opacity=0.5; } - vtkActor *actor; int i,size=_lstViewPoints.size(); for (i=0;iGetProperty()->SetOpacity( opacity ); _textActor->GetProperty()->SetOpacity( opacity ); - _textActor->SetInput(" "); + _textActor->SetInput("00"); } // ---------------------------------------------------------------------------- @@ -3501,7 +3499,7 @@ void manualViewBaseContour::SetShowText(bool ok) _show_text = ok; if (_show_text==false) { - _textActor->SetInput(" "); + _textActor->SetInput("00"); } } // ---------------------------------------------------------------------------- @@ -4195,7 +4193,7 @@ void manualContourControler::MouseMove(int x, int y) // virtual if (!IsEditable()) { GetManualViewBaseContour()->RemoveControlPoints(); - GetManualViewBaseContour()->RemoveTextActor(); +// GetManualViewBaseContour()->RemoveTextActor(); GetManualViewBaseContour()->Refresh(); this->_vtkInteractorStyleBaseView->SetRefresh_waiting(); } @@ -5192,10 +5190,8 @@ void manualContourBaseControler::MouseReleaseLeft(int x, int y) if (_state==7){ _state = 0; } SetMoving( false ); GetManualViewBaseContour()->SelectPosibleContour(x,y,GetZ()); -printf("EED %p manualContourBaseControler::MouseReleaseLeft 01 \n",this); if( GetIfCompleteCreation() && IsEditable() && !GetManualViewBaseContour()->GetPosibleSelected() && (GetManualViewBaseContour()->GetIdPoint(x,y,GetZ())==-1) ) { -printf("EED %p manualContourBaseControler::MouseReleaseLeft 02 \n",this); SetEditable( false ); SetPosibleToMove( false ); } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/manualContour.h b/lib/maracasVisuLib/src/interface/wxWindows/manualContour.h index af5237e..2f3f778 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/manualContour.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/manualContour.h @@ -569,7 +569,7 @@ private: // ---------------------------------------------------------------------------- -class creaMaracasVisu_EXPORT manualViewRoi: public manualViewBaseContour +class creaMaracasVisu_EXPORT manualViewRoi: public manualViewContour { public: manualViewRoi(); @@ -595,7 +595,7 @@ private: // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- -class creaMaracasVisu_EXPORT manualViewBullEyeSector: public manualViewBaseContour +class creaMaracasVisu_EXPORT manualViewBullEyeSector: public manualViewContour { public: manualViewBullEyeSector(); -- 2.46.2