[haiku-commits] Re: haiku: hrev49012 - src/apps/haikudepot/ui

  • From: Michael Lotz <mmlr@xxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 11 Apr 2015 11:45:07 +0200

Hi Stephan

On 09.04.2015 10:57, Stephan Aßmus wrote:

thanks for improving HaikuDepot! Initially, the idea was that the
PackageInfo always lives longer than the package row, but meanwhile I
also thought that these changes should be done.

It is less about the lifetime of the PackageInfo itself than about the icon bitmaps stored there.

In the case I debugged, there is a generic bitmap stored at the beginning. Then a better icon is received and the bitmap is replaced. A notification about the changed bitmap is sent out and the BitmapView updates its bitmap.

The problem is that the BitmapView still uses the old bitmap to determine the size difference between the old and the new bitmap to check for the need of a layout invalidation. Previously the old bitmap was already deleted at this point because the BitmapView didn't hold a reference to the SharedBitmap that contained it. Now the bitmap is only deleted once the BitmapView is updated with the new one.

Regards,
Michael


Other related posts: