Commit 34b0d0bc authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

StringWidget: Check for emptiness if NotEmpty flag is specified.

parent 9ee04161
......@@ -38,6 +38,11 @@ StringWidget::StringWidget( SettingValue *s, QWidget *parent /*= NULL*/ ) :
bool
StringWidget::save()
{
if ( ( m_setting->flags() & SettingValue::NotEmpty ) != 0 )
{
if ( m_lineEdit->text().length() == 0 )
return false;
}
m_setting->set( m_lineEdit->text() );
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment