]> Creatis software - clitk.git/commitdiff
bad fix for vvToolCropImage. The seg occurs (also) on the mReducedExtent array
authormpech <maxime.pech@insa-lyon.fr>
Mon, 23 May 2011 14:58:47 +0000 (16:58 +0200)
committermpech <maxime.pech@insa-lyon.fr>
Mon, 23 May 2011 14:58:47 +0000 (16:58 +0200)
vv/vvToolCropImage.cxx

index 2030407b614cfcc2df3d1b16607779e1fef99151..4386219778920df23c285f4a762e213b0ea0d0c8 100644 (file)
@@ -84,10 +84,10 @@ vvToolCropImage::~vvToolCropImage()
 //------------------------------------------------------------------------------
 void vvToolCropImage::closeEvent(QCloseEvent *event)
 {
-  // Reset extends
-  for(int i=0; i<mExtentSize; i++) mReducedExtent[i] = mInitialExtent[i];
   if(mCurrentSlicerManager){
-    UpdateExtent();
+    // Reset extends
+    for(int i=0; i<mExtentSize; i++) mReducedExtent[i] = mInitialExtent[i];
+      UpdateExtent();
   }
   event->accept();
 }
@@ -117,6 +117,7 @@ void vvToolCropImage::sliderXMinValueChanged(int s)
 {
   xmaxSlider->setMinimum(xminSlider->value());
   mReducedExtent[0] = xminSlider->value();
+  std::cout<<"new value "<<mReducedExtent[0]<<std::endl;
   UpdateExtent();
 }
 //------------------------------------------------------------------------------