[PATCH] juk: fix the disproportional expansion of a changed column

Michael Pyne mpyne at kde.org
Sat May 7 15:26:41 BST 2011


On Saturday, May 07, 2011 16:22:52 Γιώργος Κυλάφας wrote:
> Hi all,
> 
> While checking Playlist::calculateColumnWeights(), I noticed that the
> *all* the column weights were *always* reset to -1, but only the
> weight of the changed one was re-calculated afterwards. So, I added
> the line shown in the attached patch, which keeps the old column
> weights and seems to fix the behavior I noticed.

Good idea. As with caching in general it is essential to ensure that every way 
that column widths could be changed is accounted for and the cache cleared if 
necessary. In this case as long as column weights were cached correctly before 
your change should simply make it work again, but it's a good thing to keep in 
mind.

> However, perhaps a better solution would be to re-calculate the
> weights of all the columns, and not only of the changed one.

It's certainly a possible solution, but seems to go against the idea of 
caching the weights in general, so why don't you commit this patch and we'll 
test it out for a week or two? I think it's fine the way it is.

Regards,
 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20110507/14c223f5/attachment.sig>
-------------- next part --------------
_______________________________________________
kde-multimedia mailing list
kde-multimedia at kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia


More information about the kde-multimedia mailing list