X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FvtkInteractorStyleBaseView.cxx;h=2e973842d0bee3858cfe2f2cfd09ba8907de918e;hb=2a69bae264c4dc43a7189f16b53a66dcd3a774dc;hp=f68e2afcf42e519440fa871a094830a7d2d8bcc4;hpb=a4ee3758aa0477f677fb981e2c4d6e29995e8db8;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx index f68e2af..2e97384 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx @@ -99,8 +99,9 @@ void vtkInteractorStyleBaseView::RemoveInteractorStyleMaracas(InteractorStyleMa { _lstInteractorStyleMaracas.erase(iter); removed = true; + } else { + iter++; } - iter++; } } //--------------------------------------------------------------------------- @@ -130,8 +131,13 @@ void vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas(int type) for (i=0;iGetActive()==true){ + if (i < _lstInteractorStyleMaracas.size() ) + { + intStyMar = _lstInteractorStyleMaracas[i]; + } else { + intStyMar=NULL; + } + if (intStyMar!=NULL && intStyMar->GetActive()==true){ if (type ==1) { // OnRightButtonDown if (intStyMar->OnRightButtonDown()==false) @@ -322,9 +328,16 @@ void vtkInteractorStyleBaseView::EvaluateToRefresh() { _parent_refresh_waiting = false; wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh +//CPR 13/01/2010 this->_wxvtkbaseview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1); - } - } + int i; + int size = _lstParentToReport.size(); + for(i = 0; iProcessEvent(newevent1); + }//for + }//if + }//if _blockRefresh } //--------------------------------------------------------------------------- void vtkInteractorStyleBaseView::BlockRefresh() @@ -335,4 +348,20 @@ void vtkInteractorStyleBaseView::BlockRefresh() void vtkInteractorStyleBaseView::UnBlockRefresh() { _blockRefresh=false; -} \ No newline at end of file +} + +wxEvtHandler* vtkInteractorStyleBaseView::GetParentToReport(int i) +{ + wxEvtHandler* parentToReport = NULL; + if(i>=0 && i<_lstParentToReport.size()) + { + parentToReport = _lstParentToReport[i]; + } + return parentToReport; + +} + +void vtkInteractorStyleBaseView::AddParentToReport(wxEvtHandler* parentToReport) +{ + _lstParentToReport.push_back(parentToReport); +}