X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FwxVtkMPR3DViewCntrlPanel.cxx;h=790d3bc01c7b708f97561878cd7e7e2157a18db2;hb=3283472f764535492122c3b2ade020a749c1bd2a;hp=32624a50b213a59d12842f9a9c0cfa284aa79757;hpb=5e1c169dd9642757c10ed86a5279f2ae7a69ed8f;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx index 32624a5..790d3bc 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx @@ -280,7 +280,7 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV } //------------------------------------------------------------------- -void wxVtkMPR3DViewCntrlPanel::UpdateControlPanel() +void wxVtkMPR3DViewCntrlPanel::UpdateControlPanel(bool firsttime) { vtkMPRBaseData* basedata = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData(); if(basedata != NULL){ @@ -288,15 +288,19 @@ void wxVtkMPR3DViewCntrlPanel::UpdateControlPanel() vtkImageData* img = basedata->GetImageData(); int x0,x1,y0,y1,z0,z1; - if(img){ + if(img) + { img->GetExtent(x0,x1,y0,y1,z0,z1); _positionX->SetRange(x0,x1); _positionY->SetRange(y0,y1); _positionZ->SetRange(z0,z1); - _positionX->SetValue((x0+x1)/2); - _positionY->SetValue((y0+y1)/2); - _positionZ->SetValue((z0+z1)/2); + if (firsttime==true) + { + _positionX->SetValue((x0+x1)/2); + _positionY->SetValue((y0+y1)/2); + _positionZ->SetValue((z0+z1)/2); + } // if firsttime //EED 12April2012 This make a floting window in MacOs and Linux with for windows // _positionX->Update();