Skip to content

Commit

Permalink
clear value on clear in case the value is the null representator (null)
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav committed Nov 13, 2018
1 parent a02fb08 commit f44af04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/editorwidgets/qgsdoublespinbox.cpp
Expand Up @@ -107,6 +107,8 @@ void QgsDoubleSpinBox::changed( double value )
void QgsDoubleSpinBox::clear()
{
setValue( clearValue() );
if ( mLineEdit->isNull() )
mLineEdit->clear();
}

void QgsDoubleSpinBox::setClearValue( double customValue, const QString &specialValueText )
Expand Down
2 changes: 2 additions & 0 deletions src/gui/editorwidgets/qgsspinbox.cpp
Expand Up @@ -104,6 +104,8 @@ void QgsSpinBox::changed( int value )
void QgsSpinBox::clear()
{
setValue( clearValue() );
if ( mLineEdit->isNull() )
mLineEdit->clear();
}

void QgsSpinBox::setClearValue( int customValue, const QString &specialValueText )
Expand Down

0 comments on commit f44af04

Please sign in to comment.