Skip to content

Commit 59583e9

Browse files
committedSep 17, 2016
Fix constant background CPU usage
1 parent 5e96192 commit 59583e9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/gui/qgsfilterlineedit.cpp

Lines changed: 3 additions & 1 deletion
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 )

8 commit comments

Comments
 (8)

NathanW2 commented on Sep 17, 2016

@NathanW2
Member

Was this what you talked to me about the other day?

nyalldawson commented on Sep 17, 2016

@nyalldawson
CollaboratorAuthor

Yep. There was an endless cycle between this and qgsdoublespinbox. All fixed:)

NathanW2 commented on Sep 17, 2016

@NathanW2
Member

rduivenvoorde commented on Sep 17, 2016

@rduivenvoorde
Contributor

thanks @nyalldawson !

this makes my day \o/

can you please also backport to master_2 ?

jef-n commented on Sep 17, 2016

@jef-n
Member

@rduivenvoorde done. Apparently also fixes a strange bug with the file selection dialog, which was only partly visible for me.

rduivenvoorde commented on Sep 17, 2016

@rduivenvoorde
Contributor

@jef-n yep, noticed that too. Thanks

jef-n commented on Sep 17, 2016

@jef-n
Member

See also #15568

nyalldawson commented on Sep 17, 2016

@nyalldawson
CollaboratorAuthor

How did you find it?

@nirvn bisected to the offending commit

Please sign in to comment.