Skip to content

Commit f9219b3

Browse files
nyalldawsonjef-n
authored andcommitted
Fix constant background CPU usage
(cherry picked from commit 59583e9)
1 parent 546ae28 commit f9219b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/gui/qgsfilterlineedit.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@ QgsFilterLineEdit::QgsFilterLineEdit( QWidget* parent, const QString& nullValue
4646

4747
void QgsFilterLineEdit::setShowClearButton( bool visible )
4848
{
49+
bool changed = mClearButtonVisible != visible;
4950
mClearButtonVisible = visible;
5051
if ( !visible )
5152
mClearHover = false;
5253

53-
update();
54+
if ( changed )
55+
update();
5456
}
5557

5658
void QgsFilterLineEdit::mousePressEvent( QMouseEvent* e )

0 commit comments

Comments
 (0)