Fix the playlist constantly redrawing itself using 100% cpu time. required a near...
commit59e37c6c4112004b6c0906b3451409e70583e043
authornhnielsen <nhnielsen@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>
Mon, 10 Sep 2007 17:39:50 +0000 (10 17:39 +0000)
committernhnielsen <nhnielsen@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>
Mon, 10 Sep 2007 17:39:50 +0000 (10 17:39 +0000)
tree525b58d64ba4565ecc10db9237da200b18805760
parenteb7d0028b60be8ccac4e506e8df519c6b492e3dd
Fix the playlist constantly redrawing itself using 100% cpu time. required a near complete rewrite of the paint() method.

It turns out that there are quite a few "gotcha's" when inside the paint method of a QGraphicsItem. Any call to show() of a child item or setBrush() WILL cause paint to get called again. This is ok if one is very carefull that
the same call will not occur from within the next call to paint(), as otherwise we have an infinte, if non blocking, loop eating up resources as fast as it can.

I managed to somehow kill the text of the playlist items, how is beyond me at the moment, but I will work on bringing it back!

git-svn-id: svn+ssh://svn.kde.org/home/kde/trunk/extragear/multimedia/amarok@710712 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
src/playlist/PlaylistGraphicsItem.cpp