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

Γιώργος Κυλάφας (Giorgos Kylafas) gekylafas at gmail.com
Sat May 7 14:22:52 BST 2011

Hi all,

after the latest (May 5th) changes in trunk, I noticed a strange
behavior in JuK: if I changed the contents of a column (e.g. Title)
and saved the changes, then that column would get disproportionally
wider than the other columns.

I git-bisected that to commit 1230441 "Add very slight optimization to
collection list creation". The only relevant change in that commit
seemed to be http://websvn.kde.org/trunk/KDE/kdemultimedia/juk/collectionlist.cpp?r1=1230441&r2=1230440&pathrev=1230441#h403.
However, the change seemed logical, i.e. we should first compare the
old weight value of the column with the new one and then update the
value. So, the bug should lie elsewhere and this change only triggered

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.

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


Γιώργος Κυλάφας (Giorgos Kylafas)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-expansion-of-changed-column.patch
Type: text/x-diff
Size: 1081 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20110507/103d858c/attachment.patch>
-------------- next part --------------
kde-multimedia mailing list
kde-multimedia at kde.org

More information about the kde-multimedia mailing list