-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix] Fix automatic trimming of search bar text #14497
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, the whitespace fix LGTM
But I think you need to adjust findCurrentTextIndex()
, too. Currently the text (with spaces) is added to the list (without spaces) over and over again when you open the query list.
src/widget/wsearchlineedit.cpp
Outdated
@@ -543,7 +543,7 @@ void WSearchLineEdit::slotTriggerSearch() { | |||
/// saves the current query as selection | |||
void WSearchLineEdit::slotSaveSearch() { | |||
m_saveTimer.stop(); | |||
QString cText = currentText().trimmed(); | |||
QString cText = currentText(); // Keep original text with spaces for UI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QString cText = currentText(); // Keep original text with spaces for UI | |
// Keep original text for UI, potentially with trailing spaces | |
QString cText = currentText(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, the query list was getting repeated updations.
I've fixed this, and the behaviour seems to be okay now.
Btw the bug already exists in 2.5, so please rebase and force-push. |
2f69718
to
b82b103
Compare
@ronso0 |
Thank you, LGTM 👍 FWIW I noticed a glitch in LateNight (PaleMoon) that may also exist in 2.5: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
Oh, and we still need you sign the Mixxx Contributor Agreement and comment here when you have done so. It gives us permission to distribute your contribution under the GPL v2 or later license and the Apple Mac App Store. It is also helpful for us to have contact information for contributors in case we may need it in the future. |
Can you please rebase onto 2.5 to trigger CI? |
As described in issue mixxxdj#14486, the search bar trims leading and trailing spaces in user's current text input after the auto-save timeout. This PR fixes the issue by removing the problematic `trimmed()` call. Adds fix for keeping search history clean. Adds fix for duplicated inserts in query box. Signed-off-by: Anmol Mishra <[email protected]>
b82b103
to
c304c94
Compare
Hi, thanks for approving the PR. I've been occupied with a conference deadline for this Friday, apologies for the delay.
Done
I just force pushed after rebase, still doesn't trigger CI. ![]() |
Yeah, now it's there again. weird.. |
Thank you very much! |
search-no-trim.mov
As described in issue #14486, the search bar trims leading and trailing spaces in user's current text input after the auto-save timeout.
This PR fixes the issue by removing the problematic
trimmed()
call.