Skip to content
Permalink
Browse files

Fix cursor not always reset when clearing widget

(cherry-picked from 228ff23)
  • Loading branch information
nyalldawson committed Sep 8, 2016
1 parent ce7c5eb commit bc0f99384e232c1f01dc4cf8a82f5d5bea9f7e8c
Showing with 11 additions and 0 deletions.
  1. +11 −0 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

0 comments on commit bc0f993

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