Bug 182753

Summary: Adding or removing collections breaks table layout in Settings -> Collections
Product: [Unmaintained] kdelibs Reporter: kgw
Component: kdeuiAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: ereslibre, marcel.wiesweg, opensourcecat
Priority: NOR    
Version: SVN   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Unspecified   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Add collection button does not change position

Description kgw 2009-02-01 18:08:02 UTC
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.
Comment 1 Mikolaj Machowski 2009-02-01 22:15:29 UTC
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...
Comment 2 Andi Clemens 2009-02-01 22:19:36 UTC
I can confirm it now, couldn't before as you posted it :-)
Weird.
It only happens when adding collections, not when removing them...
Comment 3 Marcel Wiesweg 2009-02-01 22:45:56 UTC
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.
Comment 4 Marcel Wiesweg 2009-02-02 11:29:35 UTC
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)
Comment 5 Marcel Wiesweg 2009-02-02 11:40:20 UTC
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.
Comment 6 Salvatore Brigaglia 2009-07-08 20:44:14 UTC
Can confirm this in r993443. Uploading a screenshot
Comment 7 Salvatore Brigaglia 2009-07-08 20:45:01 UTC
Created attachment 35165 [details]
Add collection button does not change position
Comment 8 caulier.gilles 2009-07-08 20:58:34 UTC
Salvatore, 

Which KDE and Qt version you use exactly ?

Gilles Caulier
Comment 9 Andi Clemens 2009-07-08 21:03:51 UTC
Confirmed, the bug is still present in Qt 4.5.2 and KDE 4.2.4
Comment 10 Marcel Wiesweg 2009-07-09 10:47:29 UTC
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
Comment 11 Marcel Wiesweg 2009-07-09 10:52:10 UTC
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).
Comment 12 Christoph Feck 2009-12-09 07:07:29 UTC

*** This bug has been marked as a duplicate of bug 187820 ***