]> Creatis software - creaMaracasVisu.git/commitdiff
#3019 creaMaracasVisu Bug New Normal Windows MPR2D refresh
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Tue, 27 Sep 2016 12:57:26 +0000 (14:57 +0200)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Tue, 27 Sep 2016 12:57:26 +0000 (14:57 +0200)
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx

index 9fee22620db3f2a3efdbf636276225a123a8e24b..8578922356f4f7c86ec9a4ea9f3f7d706d3d17bd 100644 (file)
@@ -361,15 +361,15 @@ void wxMaracas_ViewerWidget::Refresh(bool eraseBackground ,const wxRect* rect  )
        //-------------------------------------------------------------------------
        void wxMaracas_ViewerWidget::RefreshView()
        {
-               if (mvtk2Dbaseview                              !=NULL ){ mvtk2Dbaseview->Refresh();                            }
-               if (mvtkmpr2Dview_X                             !=NULL ){ mvtkmpr2Dview_X->Refresh();                           }
-               if (mvtkmpr2Dview_Y                             !=NULL ){ mvtkmpr2Dview_Y->Refresh();                           }
-               if (mvtkmpr2Dview_Z                             !=NULL ){ mvtkmpr2Dview_Z->Refresh();                           }
-               if (mvtkplane2Dview                             !=NULL ){ mvtkplane2Dview->Refresh();                           }
-               if (mwxsphereview                               !=NULL ){ mwxsphereview ->RefreshView();                        }
-               if (mwxvtkmpr3Dview                             !=NULL ){ mwxvtkmpr3Dview->RefreshView();                       }
-               if (mwxvtkclipping3Dview                !=NULL ){ mwxvtkclipping3Dview->Refresh();                      }
-               if (mwxvtk3Dbaseview_Clipping3D !=NULL ){ mwxvtk3Dbaseview_Clipping3D->Refresh();       }
+               if (mwxvtk3Dbaseview_Clipping3D !=NULL ){ mwxvtk3Dbaseview_Clipping3D->Refresh();        }
+               if (mwxvtkclipping3Dview                !=NULL ){ mwxvtkclipping3Dview->Refresh();                       }
+               if (mwxvtkmpr3Dview                             !=NULL ){ mwxvtkmpr3Dview->RefreshView();                        }
+               if (mvtk2Dbaseview                              !=NULL ){ mvtk2Dbaseview->Refresh();                             }
+               if (mvtkmpr2Dview_X                             !=NULL ){ mvtkmpr2Dview_X->Refresh();                            }
+               if (mvtkmpr2Dview_Y                             !=NULL ){ mvtkmpr2Dview_Y->Refresh();                            }
+               if (mvtkmpr2Dview_Z                             !=NULL ){ mvtkmpr2Dview_Z->Refresh();                            }
+               if (mvtkplane2Dview                             !=NULL ){ mvtkplane2Dview->Refresh();                            }
+               if (mwxsphereview                               !=NULL ){ mwxsphereview ->RefreshView();                         }
        }
 
        //-------------------------------------------------------------------------
index 50354ae4997036662a965aee46712509cef4df30..88ce1acc9cff550f035abb709da43f47e5dd5132 100644 (file)
@@ -73,20 +73,19 @@ void wxVtkBaseView::Configure()  // virtual
 //-------------------------------------------------------------------
 void wxVtkBaseView::Refresh()  // virtual 
 {
-       
 // EED 10 Oct 2007
        #if defined(WIN32)
-               _iren->Refresh(false);
+               _iren->Refresh(true);
+// EED 27 sept 2016
+          vtkRenderWindowInteractor *vri = GetWxVTKRenderWindowInteractor();
+          vri->vtkRenderWindowInteractor::Render();
        #else
-       
 //EED 01Avril2009
 //             _iren->Render();        
        vtkRenderWindowInteractor *vri = GetWxVTKRenderWindowInteractor();
        vri->vtkRenderWindowInteractor::Render();
-       
                //_iren->Refresh();
        #endif
-
 }
 //-------------------------------------------------------------------
 void wxVtkBaseView::RefreshView()  // virtual 
index bee80ab5f755e8b6148bc42a8e5e2066f5f2f3bf..96fad29aab966c22e5198c8c3bebe152cf7bf4dd 100644 (file)
@@ -289,8 +289,7 @@ void wxVtkMPR2DView::Refresh()
                z =  zz*spc[2];
 
 
-               if ((xx!=_backX) || (yy!=_backY) || (zz!=_backZ)) {
-
+               if ((xx!=_backX) || (yy!=_backY) || (zz!=_backZ)  ) {
                        if (_direction==0) {    // YZ
                                if(_imageViewer2XYZ)
                                {
@@ -349,17 +348,15 @@ void wxVtkMPR2DView::Refresh()
                        _backY=yy;
                        _backZ=zz;
                }
-
-
 //EED 2016/02/19
        vtkImageActor *imageactor = _imageViewer2XYZ->GetVtkImageViewer2()->GetImageActor();
        imageactor->SetInterpolate( GetVtkBaseData()->GetInterpolate() );
-
 //EED 01nov2012
                UpdateColorWindowLevel();
                wxVtkBaseView::Refresh();
        }
 }
+
 //-------------------------------------------------------------------
 int wxVtkMPR2DView::GetActualSlice()   // virtual
 {