From: srit Date: Thu, 10 Jun 2010 16:10:02 +0000 (+0000) Subject: Corrected bug introduced in release 1.28: was crashing when image was not opened X-Git-Tag: v1.2.0~615 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=db5359713d94f0dbc38b7f8060ad120f69ec3df4;p=clitk.git Corrected bug introduced in release 1.28: was crashing when image was not opened --- diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index b6e52eb..c0abea3 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -864,19 +864,19 @@ void vvMainWindow::LoadImages(std::vector 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(); } //------------------------------------------------------------------------------