From 228ff23d81a5001a3b323902081264931731a8ef Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 8 Sep 2016 18:46:25 +1000 Subject: [PATCH] Fix cursor not always reset when clearing widget --- src/gui/qgsfilterlineedit.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gui/qgsfilterlineedit.cpp b/src/gui/qgsfilterlineedit.cpp index dd7f52ab403..99394dd9116 100644 --- a/src/gui/qgsfilterlineedit.cpp +++ b/src/gui/qgsfilterlineedit.cpp @@ -107,7 +107,12 @@ void QgsFilterLineEdit::clearValue() case ClearToDefault: setText( mDefaultValue ); break; + } + if ( mClearHover ) + { + setCursor( Qt::IBeamCursor ); + mClearHover = false; } setModified( true ); @@ -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