Skip to content

Commit

Permalink
Fix cursor not always reset when clearing widget
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 8, 2016
1 parent d959384 commit 228ff23
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/gui/qgsfilterlineedit.cpp
Original file line number Diff line number Diff line change
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 228ff23

Please sign in to comment.