Version: Version 0.10.0-rc2 (rev.: 918022) (using KDE 4.2.0) Installed from: Compiled From Sources When adding or removing local or removable media collections the buttons labeled "Add Collection" remain at their old positions instead of being adjusted to their appropriate position with the added or removed collection accounted for.
Interesting, few days ago I closed identical bug report because everything worked for me. And now cannot confirm this report. Note: I use 4.2svn and digiKam from SVN, not release versions...
I can confirm it now, couldn't before as you posted it :-) Weird. It only happens when adding collections, not when removing them...
Confirm. Damn. Goya / KWidgetItemDelegate was rewritten for KDE4.2. So this is a regression that we can either fix by finding what we should do differently, working around it or it is a bug in kdelibs and needs to be fixed there. Newly added items also do not get the "delete" icon button to remove them again. I guess that's the same problem.
I CC Rafael Fernandez Lopez, the author of Goya/KWidgetItemDelegate. Perhaps he has ideas what might be required to make the delegate work again in a QTreeView with KDE4.2 (worked fine with 4.1)
I can confirm that updateItemWidgets is _not_ called for the category items when their position is moved. I think it should. When a child item in a treeview is added, all following items in higher levels as should should be updated - so I think at least.
Can confirm this in r993443. Uploading a screenshot
Created attachment 35165 [details] Add collection button does not change position
Salvatore, Which KDE and Qt version you use exactly ? Gilles Caulier
Confirmed, the bug is still present in Qt 4.5.2 and KDE 4.2.4
SVN commit 993647 by mwiesweg: Workaround problem by emitting a "dry" layoutChanged() signal after an entry has been added. This forces a relayout of all widgets. There are no adverse effects on this (this view does not handle large numbers of entries) but this is stricly a workaround for the underlying bug in kdelibs which is not fixed. CCBUG: 182753 M +6 -0 setupcollectionview.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=993647
Reassigning to kdelibs. Hint: KWidgetItemDelegate relayouts all subsequent indexes when one is added. For a tree view, the hierarchy must be climbed as well and all following top-level indexes and their children must be relayouted (or, simply, all entries).
*** This bug has been marked as a duplicate of bug 187820 ***