From: tbaudier Date: Fri, 2 Dec 2016 08:59:43 +0000 (+0100) Subject: Debug Crop tool cancel X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=bfbffc033e8c2f7a9448dcf8611e5a81b1898559;p=clitk.git Debug Crop tool cancel A segmentation fault occured after a click on Cancel during image selection --- diff --git a/vv/vvToolCropImage.cxx b/vv/vvToolCropImage.cxx index 1530341..736a7d6 100644 --- a/vv/vvToolCropImage.cxx +++ b/vv/vvToolCropImage.cxx @@ -105,12 +105,13 @@ void vvToolCropImage::closeEvent(QCloseEvent *event) for(int i=0; iGetNumberOfSlicers(); i++) mCurrentSlicerManager->GetSlicer(i)->EnableReducedExtent(false); UpdateExtent(); - } - mCurrentSlicerManager->GetImage()->GetTransform()[0]->SetMatrix(mConcatenedTransform); - for (int i=0; iGetNumberOfSlicers(); i++) { - mCurrentSlicerManager->GetSlicer(i)->ResetCamera(); - mCurrentSlicerManager->GetSlicer(i)->Render(); - mCurrentSlicerManager->UpdateLinkedNavigation( mCurrentSlicerManager->GetSlicer(i) ); + + mCurrentSlicerManager->GetImage()->GetTransform()[0]->SetMatrix(mConcatenedTransform); + for (int i=0; iGetNumberOfSlicers(); i++) { + mCurrentSlicerManager->GetSlicer(i)->ResetCamera(); + mCurrentSlicerManager->GetSlicer(i)->Render(); + mCurrentSlicerManager->UpdateLinkedNavigation( mCurrentSlicerManager->GetSlicer(i) ); + } } vvToolWidgetBase::closeEvent(event); }