]> Creatis software - clitk.git/commitdiff
Corrected bug when opening unexisting file (introduced by myself in version 1.52)
authorsrit <srit>
Sun, 20 Mar 2011 20:00:13 +0000 (20:00 +0000)
committersrit <srit>
Sun, 20 Mar 2011 20:00:13 +0000 (20:00 +0000)
vv/vvMainWindow.cxx

index 681d30e7a6e3722c125972d0a0e272fff5306135..fb764580f224f30bb6fe8cd3fd8655b0171dc2dc 100644 (file)
@@ -828,7 +828,7 @@ void vvMainWindow::LoadImages(std::vector<std::string> files, LoadedImageType fi
       else {
         SetImageSucceed = imageManager->SetImages(files,filetype, number);
       }
-      if (SetImageSucceed == false) {
+      if (!SetImageSucceed) {
         QApplication::restoreOverrideCursor();
         QString error = "Cannot open file \n";
         error += imageManager->GetLastError().c_str();
@@ -902,8 +902,8 @@ void vvMainWindow::LoadImages(std::vector<std::string> files, LoadedImageType fi
                 this,SLOT(ChangeImageWithIndexOffset(vvSlicerManager*,int,int)));
         connect(mSlicerManagers.back(),SIGNAL(LandmarkAdded()),landmarksPanel,SLOT(AddPoint()));
         InitSlicers();
+        numberofsuccesulreads++;
       }
-      numberofsuccesulreads++;
     }
   }
   if (numberofsuccesulreads) {