Skip to content

Commit

Permalink
Fix cursor not always reset when clearing widget
Browse files Browse the repository at this point in the history
(cherry-picked from 228ff23)
  • Loading branch information
nyalldawson committed Sep 8, 2016
1 parent ce7c5eb commit bc0f993
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/gui/qgsfilterlineedit.cpp
Expand Up @@ -107,7 +107,12 @@ void QgsFilterLineEdit::clearValue()
case ClearToDefault:
setText( mDefaultValue );
break;
}

if ( mClearHover )
{
setCursor( Qt::IBeamCursor );
mClearHover = false;
}

setModified( true );
Expand Down Expand Up @@ -151,6 +156,12 @@ void QgsFilterLineEdit::onTextChanged( const QString &text )
setStyleSheet( mStyleSheet );
emit valueChanged( text );
}

if ( mClearHover && !shouldShowClear() )
{
setCursor( Qt::IBeamCursor );
mClearHover = false;
}
}

bool QgsFilterLineEdit::shouldShowClear() const
Expand Down

0 comments on commit bc0f993

Please sign in to comment.