From e4c2f47262da0a2e9b321862899e11d0e52c7d0c Mon Sep 17 00:00:00 2001 From: Julien Malik <julien.malik@c-s.fr> Date: Tue, 27 Sep 2011 17:24:44 +0200 Subject: [PATCH] BUG: fix integer widget activation --- Applications/Test/otbTestApplication.cxx | 1 + Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.cxx | 2 +- Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.h | 2 +- Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.cxx | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Applications/Test/otbTestApplication.cxx b/Applications/Test/otbTestApplication.cxx index 6412dddf53..46597b5162 100644 --- a/Applications/Test/otbTestApplication.cxx +++ b/Applications/Test/otbTestApplication.cxx @@ -55,6 +55,7 @@ private: AddParameter(ParameterType_Int, "int", "Integer"); MandatoryOff("int"); AddParameter(ParameterType_Float, "float", "Float"); + MandatoryOff("float"); AddParameter(ParameterType_String, "string", "String"); AddParameter(ParameterType_Filename, "filename", "File name"); AddParameter(ParameterType_Directory, "directory", "Directory name"); diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.cxx index 071689ac02..7ae144e2f2 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.cxx +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.cxx @@ -53,7 +53,7 @@ QtWidgetModel* QtWidgetParameterBase::GetModel() // Slot connected to the signal emitted the checkBox relative to // current widget -void QtWidgetParameterBase::SetValue( int value ) +void QtWidgetParameterBase::SetActivationState( int value ) { switch(value) { diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.h index d699a832c6..ad3f9e3d1f 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.h +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterBase.h @@ -41,7 +41,7 @@ public: public slots: void UpdateGUI(); - void SetValue( int value ); + void SetActivationState( int value ); void SetValue( bool v ); protected slots: diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.cxx index bd22325738..1bb13aa87f 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.cxx +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.cxx @@ -73,7 +73,7 @@ void QtWidgetParameterGroup::DoCreateWidget() // CheckBox (col 1) QCheckBox * checkBox = new QCheckBox; - connect(checkBox, SIGNAL(stateChanged(int)), specificWidget, SLOT(SetValue(int))); + connect(checkBox, SIGNAL(stateChanged(int)), specificWidget, SLOT(SetActivationState(int))); if (param->IsRoot()) { -- GitLab