From 410e06c32fc330d53bc93f81afeca8b72a6ddb26 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Tue, 10 Oct 2017 09:19:55 +0200 Subject: [PATCH] #3144 creaMaracasVisu Bug New Normal - changeWx28to30 --- .../widgets/manualContour/manualView3VContour.cpp | 12 ++---------- .../widgets/manualContour/manualViewBaseContour.cpp | 7 +------ .../widgets/manualContour/manualViewBaseContour.h | 4 ++-- .../manualContour/manualViewBullEyeSector.cpp | 7 ------- .../widgets/manualContour/manualViewContour.cpp | 13 +++++++------ .../widgets/manualContour/manualViewPoints.cpp | 2 +- .../widgets/manualContour/manualViewRoi.cpp | 10 ++++++---- .../wxWindows/widgets/pPlotter/mBarRange.cxx | 11 ++++++----- 8 files changed, 25 insertions(+), 41 deletions(-) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualView3VContour.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualView3VContour.cpp index e679191..c084850 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualView3VContour.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualView3VContour.cpp @@ -87,7 +87,6 @@ void manualView3VContour::RefreshContour() // virtula { manualViewContour::RefreshContour(); int i; - //EED 27 Juin 2012 //Boundaring box _minX=99999; @@ -96,8 +95,6 @@ void manualView3VContour::RefreshContour() // virtula _maxX=-99999; _maxY=-99999; _maxZ=-99999; - - double pp[3]; // JSTG 25-02-08 ---------------------------------------- //int nps = GetNumberOfPointsSpline(); @@ -107,11 +104,8 @@ void manualView3VContour::RefreshContour() // virtula { _pts->GetPoint( i, pp ); FilterCordinateXYZ(pp[0],pp[1],pp[2]); - //EED 27 sep 2006 _pts->SetPoint( i, pp[0] , pp[1] ,pp[2] ); - - //EED 27 Juin 2012 //Boundaring box if (pp[0] < _minX) { _minX = pp[0]; } @@ -120,14 +114,12 @@ void manualView3VContour::RefreshContour() // virtula if (pp[0] > _maxX) { _maxX = pp[0]; } if (pp[1] > _maxY) { _maxY = pp[1]; } if (pp[2] > _maxZ) { _maxY = pp[2]; } - }// for - //EED 2017-03-02 - if (_pts!=NULL) { + if (_pts!=NULL) + { _pts->Modified(); } - } // ---------------------------------------------------------------------------- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp index e1588bf..47b19a0 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp @@ -48,21 +48,16 @@ manualViewBaseContour::manualViewBaseContour() _spc[0] = 1; _spc[1] = 1; _spc[2] = 1; - _coulorEdit_r = 1; _coulorEdit_g = 1; _coulorEdit_b = 0; - _coulorNormal_r = 1; _coulorNormal_g = 0; _coulorNormal_b = 1; - _coulorSelection_r = 0; _coulorSelection_g = 1; _coulorSelection_b = 0; - _widthline = 1; - } // ---------------------------------------------------------------------------- manualViewBaseContour::~manualViewBaseContour() @@ -121,7 +116,7 @@ void manualViewBaseContour :: AddCompleteContourActor( bool ifControlPoints ) } // --------------------------------------------------------------------------- -void manualViewBaseContour :: RemoveCompleteContourActor() +void manualViewBaseContour::RemoveCompleteContourActor() { /*vtkRenderer * theRenderer =*/ _wxvtkbaseview->GetRenderer(); // JPRx ?? //Removing the spline diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.h index 800e47b..be5976a 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.h @@ -188,7 +188,7 @@ public: void SetWidthLine(double width); double GetWidthLine(); - virtual void ConstructVTKObjects(); + virtual void ConstructVTKObjects(); void SetCellArray(bool type); //--------------------------------------------------- @@ -203,7 +203,7 @@ private: vtkActor *_contourVtkActor; vtkPolyDataMapper *_bboxMapper; - void DeleteVtkObjects(); + void DeleteVtkObjects(); //--------------------------------------------------- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBullEyeSector.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBullEyeSector.cpp index 60148ca..6c8765e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBullEyeSector.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBullEyeSector.cpp @@ -40,7 +40,6 @@ void manualViewBullEyeSector::RefreshContour() double x,y,z; double xx,yy,zz; //---------------------------------- - //EED 27 Juin 2012 //Boundaring box _minX=99999; @@ -49,10 +48,8 @@ void manualViewBullEyeSector::RefreshContour() _maxX=-99999; _maxY=-99999; _maxZ=-99999; - _manContModel->UpdateSpline(); nps = _manContModel->GetNumberOfPointsSpline(); - if ( _pts!=NULL ) { for( i = 0; i < nps; i++ ) @@ -62,7 +59,6 @@ void manualViewBullEyeSector::RefreshContour() yy = y*_spc[1]; zz = z*_spc[2]; _pts->SetPoint(i , xx , yy , zz ); - //EED 27 Juin 2012 //Boundaring box if (xx < _minX) { _minX = xx; } @@ -71,11 +67,8 @@ void manualViewBullEyeSector::RefreshContour() if (xx > _maxX) { _maxX = xx; } if (yy > _maxY) { _maxY = yy; } if (zz > _maxZ) { _maxY = zz; } - - }// for //EED 2017-03-02 _pts->Modified(); } // if _pts - } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp index bddf6aa..0c082a2 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp @@ -87,7 +87,6 @@ void manualViewContour::Open(FILE *pFile) void manualViewContour::RefreshContour() // virtual { int i,np,nps; - //JSTG 25-02-08 -------------------- //double t,delta, x,y,z; double x,y,z; @@ -146,9 +145,9 @@ void manualViewContour::RefreshContour() // virtual //-------------------------------------------------------------- // EED 27 sep 2006 // _pts->SetPoint(i, x,y,z ); - xx=x*_spc[0]; - yy=y*_spc[1]; - zz=z*_spc[2]; + xx = x*_spc[0]; + yy = y*_spc[1]; + zz = z*_spc[2]; _pts->SetPoint(i,xx,yy,zz ); //EED 27 Juin 2012 @@ -157,7 +156,6 @@ void manualViewContour::RefreshContour() // virtual if (yy < _minY) { _minY = yy; } if (xx > _maxX) { _maxX = xx; } if (yy > _maxY) { _maxY = yy; } - }// for }else{ _pts->SetPoint(0, 0 , 0 , 0); @@ -172,7 +170,10 @@ void manualViewContour::RefreshContour() // virtual _maxY=_maxY+1.0; //EED 2017-03-02 - _pts->Modified(); + if (_pts!=NULL) + { + _pts->Modified(); + } } // ---------------------------------------------------------------------------- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoints.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoints.cpp index bba59fa..f908f68 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoints.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoints.cpp @@ -43,7 +43,7 @@ manualViewPoints::~manualViewPoints() // ---------------------------------------------------------------------------- -manualViewPoints * manualViewPoints :: Clone() +manualViewPoints * manualViewPoints::Clone() { manualViewPoints * clone = new manualViewPoints(); CopyAttributesTo(clone); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewRoi.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewRoi.cpp index 1eb8d06..a55eb55 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewRoi.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewRoi.cpp @@ -66,7 +66,8 @@ void manualViewRoi::RefreshContour() // virtual if (np>=2) { manualPoint *mp; - for( i = 0; i < np+1; i++ ) { + for( i = 0; i < np+1; i++ ) + { ii=i%np; mp = _manContModel->GetManualPoint(ii); @@ -85,10 +86,11 @@ void manualViewRoi::RefreshContour() // virtual _pts->SetPoint(1, 0 , 0 , 0); } // if } - //EED 2017-03-02 - _pts->Modified(); - + if (_pts!=NULL) + { + _pts->Modified(); + } } // ---------------------------------------------------------------------------- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx index 489d467..8f62478 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/mBarRange.cxx @@ -68,15 +68,16 @@ END_EVENT_TABLE() //CONSTRUCTOR //---------------------------------------------------------------------------- +//wxDefaultSize mBarRange::mBarRange(wxWindow *parent, int w, int h) -:wxScrolledWindow(parent,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL) +:wxScrolledWindow(parent,-1,wxDefaultPosition, wxSize(60,60) ,wxTAB_TRAVERSAL) { - acceptedClick = true; - _bitmap_bar = NULL; + acceptedClick = true; + _bitmap_bar = NULL; SetWidth (w); SetHeight(h); - _initialPoint = 0; - trianglesHalfWidth = 5; + _initialPoint = 0; + trianglesHalfWidth = 5; // Setting the default parts colors start_Colour = wxColour(1,0,255,254); actual_Colour = wxColour(255,255,202); -- 2.47.1