Skip to content

Commit 72a33ea

Browse files
committedSep 23, 2014
QgsFilterLineEdit: Hide clear button when read only
1 parent 55f86d5 commit 72a33ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/gui/qgsfilterlineedit.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,15 @@ void QgsFilterLineEdit::clear()
8181
void QgsFilterLineEdit::changeEvent( QEvent *e )
8282
{
8383
QLineEdit::changeEvent( e );
84-
if ( !isEnabled() )
84+
if ( !isEnabled() || isReadOnly() )
8585
btnClear->setVisible( false );
8686
else
8787
btnClear->setVisible( text() != mNullValue );
8888
}
8989

9090
void QgsFilterLineEdit::onTextChanged( const QString &text )
9191
{
92-
btnClear->setVisible( !isReadOnly() && text != mNullValue );
92+
btnClear->setVisible( !isEnabled() && !isReadOnly() && text != mNullValue );
9393

9494
if ( isNull() )
9595
{

0 commit comments

Comments
 (0)
Please sign in to comment.