From: tbaudier Date: Mon, 4 Mar 2019 15:47:12 +0000 (+0100) Subject: Change name of the button in Image Arithm tool X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?p=clitk.git;a=commitdiff_plain;h=05306a598620f8eecd320abc606d1cff4b96f333 Change name of the button in Image Arithm tool Before, it was QDialogButtonBox::Discard, but according to https://doc.qt.io/archives/qt-4.8/qdialogbuttonbox.html#StandardButton-enum it can be displayed "Don't save". For this tool, we want to select 1 image instead of 2, so the name of the button is not appropriate. Moreover in skip function, the comparision to "Discard" can be complicated with another name. So I prefer to use Ignore button because it's more appropriate --- diff --git a/vv/vvToolSimpleInputSelectorWidget.cxx b/vv/vvToolSimpleInputSelectorWidget.cxx index 49c5dbc..9ecadb4 100644 --- a/vv/vvToolSimpleInputSelectorWidget.cxx +++ b/vv/vvToolSimpleInputSelectorWidget.cxx @@ -66,7 +66,7 @@ void vvToolSimpleInputSelectorWidget::EnableAllowSkip(bool b) { mAllowSkip = b; if (mAllowSkip) { - mInputSelectionButtonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Discard); + mInputSelectionButtonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Ignore); connect(mInputSelectionButtonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(skip(QAbstractButton*))); } else mInputSelectionButtonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); @@ -128,7 +128,7 @@ void vvToolSimpleInputSelectorWidget::reject() //------------------------------------------------------------------------------ void vvToolSimpleInputSelectorWidget::skip(QAbstractButton* b) { - if (b->text() == "Discard") emit sigskip(); + if (b->text() == "Ignore") emit sigskip(); } //------------------------------------------------------------------------------