From 5c1f83555b3aa97031fbab267c835b8aeaae7d73 Mon Sep 17 00:00:00 2001 From: MERLE Mathilde <“mathilde.merle@ihu-liryc.fr”> Date: Mon, 2 Jan 2023 15:50:30 +0100 Subject: [PATCH] [Registration] selector toolbox empty connect --master --- .../toolboxes/medRegistrationSelectorToolBox.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/layers/legacy/medCoreLegacy/gui/toolboxes/medRegistrationSelectorToolBox.cpp b/src/layers/legacy/medCoreLegacy/gui/toolboxes/medRegistrationSelectorToolBox.cpp index f7a675e053..6ade817b41 100644 --- a/src/layers/legacy/medCoreLegacy/gui/toolboxes/medRegistrationSelectorToolBox.cpp +++ b/src/layers/legacy/medCoreLegacy/gui/toolboxes/medRegistrationSelectorToolBox.cpp @@ -122,15 +122,17 @@ medAbstractData *medRegistrationSelectorToolBox::movingData(void) void medRegistrationSelectorToolBox::changeCurrentToolBox(int index) { medSelectorToolBox::changeCurrentToolBox(index); - - connect (currentToolBox(), SIGNAL (success()),this,SLOT(enableSelectorToolBox())); - connect (currentToolBox(), SIGNAL (failure()),this,SLOT(enableSelectorToolBox())); - d->nameOfCurrentAlgorithm = this->comboBox()->itemData(index).toString(); - if (!d->undoRedoProcess && !d->undoRedoToolBox) + if (currentToolBox()) { - connect(currentToolBox(), SIGNAL(success()), this, SLOT(handleOutput())); + connect (currentToolBox(), SIGNAL (success()),this,SLOT(enableSelectorToolBox())); + connect (currentToolBox(), SIGNAL (failure()),this,SLOT(enableSelectorToolBox())); + + if (!d->undoRedoProcess && !d->undoRedoToolBox) + { + connect(currentToolBox(), SIGNAL(success()), this, SLOT(handleOutput())); + } } }