diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputImageParameter.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputImageParameter.cxx index f451ccb4a45eabee3b93e38a0f095ec15d35b3e4..9dc95d33c83f6072b4744364d5ac821b313c424a 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputImageParameter.cxx +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputImageParameter.cxx @@ -35,7 +35,11 @@ QtWidgetOutputImageParameter::~QtWidgetOutputImageParameter() void QtWidgetOutputImageParameter::DoUpdateGUI() { - + // Update the lineEdit + if (m_Input->text() != m_OutputImageParam->GetFileName()) + { + m_Input->setText(m_OutputImageParam->GetFileName()); + } } void QtWidgetOutputImageParameter::DoCreateWidget() @@ -44,7 +48,7 @@ void QtWidgetOutputImageParameter::DoCreateWidget() m_HLayout = new QHBoxLayout; m_HLayout->setSpacing(0); m_HLayout->setContentsMargins(0, 0, 0, 0); - m_Input = new QLineEdit; + m_Input = new QLineEdit(); m_Input->setToolTip( m_OutputImageParam->GetDescription() ); connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetFileName(const QString&)) ); connect( m_Input, SIGNAL(textChanged(const QString&)), GetModel(), SLOT(NotifyUpdate()) ); diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputImageParameter.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputImageParameter.h index b3eec8f870748f484ec54be3f68eb71f2c3b600a..dbc75945c8a47a0f5bb89e5ebcef16b3ac959c3b 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputImageParameter.h +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetOutputImageParameter.h @@ -41,8 +41,10 @@ public: /** Get the PixelType*/ //itkGetMacro(PixelType, int); -protected slots: +public slots: void SetFileName( const QString& value ); + +protected slots: void SelectFile(); void SetPixelType(int pixelType);