X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=vv%2FvvToolSimpleInputSelectorWidget.cxx;h=4f7d55e9fd08c6f84847275a7fa16b91129f059c;hb=ec98e4a8aed11c9daa9bd7e2439d1ac489c933c7;hp=fcc1361814f36939f679258bd3e6650f3367732b;hpb=55575d2a73ceb9f017f6e6c28298cbacaf002792;p=clitk.git diff --git a/vv/vvToolSimpleInputSelectorWidget.cxx b/vv/vvToolSimpleInputSelectorWidget.cxx index fcc1361..4f7d55e 100644 --- a/vv/vvToolSimpleInputSelectorWidget.cxx +++ b/vv/vvToolSimpleInputSelectorWidget.cxx @@ -3,8 +3,8 @@ Program: vv Module: $RCSfile: vvToolSimpleInputSelectorWidget.cxx,v $ Language: C++ - Date: $Date: 2010/03/24 10:48:18 $ - Version: $Revision: 1.2 $ + Date: $Date: 2010/03/24 20:35:13 $ + Version: $Revision: 1.3 $ Author : David Sarrut (david.sarrut@creatis.insa-lyon.fr) Copyright (C) 2010 @@ -48,10 +48,12 @@ void vvToolSimpleInputSelectorWidget::Initialize() { connect(mInputSelectionButtonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(mInputSelectionButtonBox, SIGNAL(rejected()), this, SLOT(reject())); connect(mInputSequenceBox, SIGNAL(currentIndexChanged(int)), this, SLOT(changeInput(int))); - changeInput(0); if (mSlicerManagerList.size() == 1) { if (!mAllowSkip) accept(); } + if (mSlicerManagerList.size() == 0) { + reject(); + } } //------------------------------------------------------------------------------ @@ -78,6 +80,11 @@ void vvToolSimpleInputSelectorWidget::EnableAllowSkip(bool b) { //------------------------------------------------------------------------------ void vvToolSimpleInputSelectorWidget::SetInputList(const std::vector & l, int index) { + if (l.size() == 0) { + // TODO !!! + DD("no input > error message"); + reject(); + } mInputSequenceBox->clear(); for(unsigned int i=0; iaddItem(mSlicerManagerList[i]->GetFileName().c_str()); } mInputSequenceBox->setCurrentIndex(mCurrentIndex); - if (mSlicerManagerList.size() == 0) { - // TODO !!! - DD("no input > error message"); - reject(); - } + changeInput(mCurrentIndex); } //------------------------------------------------------------------------------