Skip to content

Commit

Permalink
QgsFilterLineEdit: Hide clear button when read only
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Sep 23, 2014
1 parent 55f86d5 commit 72a33ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgsfilterlineedit.cpp
Expand Up @@ -81,15 +81,15 @@ void QgsFilterLineEdit::clear()
void QgsFilterLineEdit::changeEvent( QEvent *e )
{
QLineEdit::changeEvent( e );
if ( !isEnabled() )
if ( !isEnabled() || isReadOnly() )
btnClear->setVisible( false );
else
btnClear->setVisible( text() != mNullValue );
}

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

if ( isNull() )
{
Expand Down

0 comments on commit 72a33ea

Please sign in to comment.