From 39ac649f6a07b1646505a9d8c418f72bd76fc64e Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Fri, 17 Apr 2020 08:58:52 +0200 Subject: [PATCH] #3393 creaMaracas Visu Bug New Normal - ViewerNV update point selection event box --- bbtk/src/bbmaracasvisuViewerNV.cxx | 24 ++++++++++++++++-------- bbtk/src/bbmaracasvisuViewerNV.h | 4 +++- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/bbtk/src/bbmaracasvisuViewerNV.cxx b/bbtk/src/bbmaracasvisuViewerNV.cxx index b5a0e89..5e01935 100644 --- a/bbtk/src/bbmaracasvisuViewerNV.cxx +++ b/bbtk/src/bbmaracasvisuViewerNV.cxx @@ -45,6 +45,9 @@ bbwxMaracas_N_ViewersWidget::bbwxMaracas_N_ViewersWidget(ViewerNV* box, :wxMaracas_N_ViewersWidget(parent,imagedata,nTypeView) { mbbViewerNV=box; + backX=-9999; + backY=-9999; + backZ=-9999; } //------------------------------------------------------------- @@ -55,14 +58,19 @@ bbwxMaracas_N_ViewersWidget::~bbwxMaracas_N_ViewersWidget() //------------------------------------------------------------- void bbwxMaracas_N_ViewersWidget::OnRefreshView(wxCommandEvent & event) { - //printf("CPR: bbwxMaracas_N_ViewersWidget::OnRefreshView -> actualiza X, Y y Z\n"); - mbbViewerNV->_point.clear(); - mbbViewerNV->_point.push_back( (int)GetX() ); - mbbViewerNV->_point.push_back( (int)GetY() ); - mbbViewerNV->_point.push_back( (int)GetZ() ); - mbbViewerNV->bbSetOutputPoint( mbbViewerNV->_point ); - mbbViewerNV->bbSignalOutputModification(std::string("Point")); - wxMaracas_N_ViewersWidget::OnRefreshView(event); + if ( (backX!=(int)GetX()) || (backY!=(int)GetY()) || (backZ!=(int)GetZ()) ) + { + backX = GetX(); + backY = GetY(); + backZ = GetZ(); + mbbViewerNV->_point.clear(); + mbbViewerNV->_point.push_back( (int)GetX() ); + mbbViewerNV->_point.push_back( (int)GetY() ); + mbbViewerNV->_point.push_back( (int)GetZ() ); + mbbViewerNV->bbSetOutputPoint( mbbViewerNV->_point ); + mbbViewerNV->bbSignalOutputModification(std::string("Point")); + wxMaracas_N_ViewersWidget::OnRefreshView(event); + } // if } //------------------------------------------------------------- diff --git a/bbtk/src/bbmaracasvisuViewerNV.h b/bbtk/src/bbmaracasvisuViewerNV.h index 0846f82..e26cf26 100644 --- a/bbtk/src/bbmaracasvisuViewerNV.h +++ b/bbtk/src/bbmaracasvisuViewerNV.h @@ -51,11 +51,13 @@ namespace bbcreaMaracasVisu public: bbwxMaracas_N_ViewersWidget(ViewerNV* box,wxWindow *parent, vtkImageData* imagedata=NULL, std::vector *nTypeView=NULL); ~bbwxMaracas_N_ViewersWidget(); - //if the MPR had generated the refresh event void OnRefreshView(wxCommandEvent &event); void OnDClickLeft(wxCommandEvent &event); private: + int backX; + int backY; + int backZ; ViewerNV *mbbViewerNV; DECLARE_EVENT_TABLE( ); }; -- 2.47.1