Skip to content

Commit 494f7bc

Browse files
committedJun 13, 2018
Fix double clear actions sometimes show in spin boxes
Fixes #19178
1 parent dab4437 commit 494f7bc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/gui/qgsfilterlineedit.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ void QgsFilterLineEdit::updateClearIcon()
7373
}
7474
else if ( !showClear && mClearAction )
7575
{
76+
// pretty freakin weird... seems the deleteLater call on the mClearAction
77+
// isn't sufficient to actually remove the action from the line edit, and
78+
// a kind of "ghost" action gets left behind... resulting in duplicate
79+
// clear actions appearing if later we re-create the action.
80+
// in summary: don't remove this "removeAction" call!
81+
removeAction( mClearAction );
7682
mClearAction->deleteLater();
7783
mClearAction = nullptr;
7884
}

0 commit comments

Comments
 (0)
Please sign in to comment.