Skip to content
Permalink
Browse files

QgsFilterLineEdit: Hide clear button when read only

  • Loading branch information
m-kuhn committed Sep 23, 2014
1 parent 55f86d5 commit 72a33ea78f9704c263bdd8075e9ad631edfd7bf8
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/gui/qgsfilterlineedit.cpp
@@ -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() )
{

0 comments on commit 72a33ea

Please sign in to comment.
You can’t perform that action at this time.