Skip to content

Commit f44af04

Browse files
committed
clear value on clear in case the value is the null representator (null)
1 parent a02fb08 commit f44af04

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/gui/editorwidgets/qgsdoublespinbox.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ void QgsDoubleSpinBox::changed( double value )
107107
void QgsDoubleSpinBox::clear()
108108
{
109109
setValue( clearValue() );
110+
if ( mLineEdit->isNull() )
111+
mLineEdit->clear();
110112
}
111113

112114
void QgsDoubleSpinBox::setClearValue( double customValue, const QString &specialValueText )

src/gui/editorwidgets/qgsspinbox.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ void QgsSpinBox::changed( int value )
104104
void QgsSpinBox::clear()
105105
{
106106
setValue( clearValue() );
107+
if ( mLineEdit->isNull() )
108+
mLineEdit->clear();
107109
}
108110

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

0 commit comments

Comments
 (0)