]> Creatis software - clitk.git/commitdiff
Corrected bug introduced in release 1.28: was crashing when image was not opened
authorsrit <srit>
Thu, 10 Jun 2010 16:10:02 +0000 (16:10 +0000)
committersrit <srit>
Thu, 10 Jun 2010 16:10:02 +0000 (16:10 +0000)
vv/vvMainWindow.cxx

index b6e52ebe239d14fd3cc2d98b92b0e9bfbace9b6b..c0abea3568925f6f8d698f48b143de4f20ee854f 100644 (file)
@@ -864,19 +864,19 @@ void vvMainWindow::LoadImages(std::vector<std::string> files, LoadedImageType fi
     UpdateTree();
     InitDisplay();
     ShowLastImage();
-  }
-  QApplication::restoreOverrideCursor();
 
-  // Try to guess default WindowLevel
-  double range[2];
-  mSlicerManagers.back()->GetImage()->GetFirstVTKImageData()->GetScalarRange(range);
-  // DD(range[0]);
-  //   DD(range[1]);
-  if ((range[0] == 0) && (range[1] == 1)) {
-    presetComboBox->setCurrentIndex(5);// binary
-  } else {
-    // TODO
+    // Try to guess default WindowLevel
+    double range[2];
+    mSlicerManagers.back()->GetImage()->GetFirstVTKImageData()->GetScalarRange(range);
+    // DD(range[0]);
+    //   DD(range[1]);
+    if ((range[0] == 0) && (range[1] == 1)) {
+      presetComboBox->setCurrentIndex(5);// binary
+    } else {
+      // TODO
+    }
   }
+  QApplication::restoreOverrideCursor();
 }
 //------------------------------------------------------------------------------