Hi John <br><br>Thanks for the patch.<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The attached patch was originally intended to address a usability pet peeve of mine, written up by someone else in <a href="https://bugs.kde.org/show_bug.cgi?id=200709" target="_blank">bug #200709</a>. Quick description: When replacing a playlist and using the search filter, it could be confusing when the playlist appeared blank (as no entries matched the filter).<br>
<br>The simple fix is to clear the filter before replacing the playlist.</blockquote><div><br>This makes a lot of sense and I agree that clearing the playlist when using the "replace" action is a really good idea! <br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">However, further inspection of the bug tracker gives <a href="https://bugs.kde.org/show_bug.cgi?id=193527" target="_blank">bug#193527</a>, where the filter is apparently also applied to anything added to the playlist. This can be fixed in a similar way by clearing the filter before any addition to the playlist. This is what the patch implements.</blockquote>
<div><br>As far as I can tell, these 2 issues are only conceptually related and not related code wise. This bug has to do with the filter in the browsers and what tracks are actually getting added to the playlist, not which one the playlist actually chooses to show. Also, in my opinion, I think this is actually the correct behavior. Of course, this is up for discussion.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hopefully this is a solution to the problem but I thought I would mail because I have concerns that:<br>1.) Because this uses signals and slots between two widgets (filter and playlist), it may introduce some sort of race condition I'm not aware of.</blockquote>
<div><br>I don't see any issues with it.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">2.) A developer has a grand scheme for these things and this is going to be cleverly redesigned anyway.</blockquote>
<div><br>No, I don't think there are any grand plans regarding this particular little fix! :-) <br><br><br>The one issue I do have with your current patch is that it clears the filter on all inserts, not just when replacing the entire playlist. I have been thinking about this for a while, and I think it makes sense to keept he filter when working on an existing playlist and only clearing it when doing a "replace". So if you can redo the patch to only clear the playlist filter in this particular case, I will be happy to commit it! :-)<br>
<br>- Nikolaj<br></div></div><br>