This should fix the wrong handling of BView::ClearOverlay() - probably, I haven't
tested it :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17301 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f4c4106a40
commit
6736b21a2a
@ -456,14 +456,16 @@ ViewLayer::SetViewBitmap(ServerBitmap* bitmap, BRect sourceRect,
|
||||
BRect destRect, int32 resizingMode, int32 options)
|
||||
{
|
||||
if (fViewBitmap != NULL) {
|
||||
Overlay* overlay = _Overlay();
|
||||
|
||||
if (bitmap != NULL) {
|
||||
// take over overlay token from current overlay (if it has any)
|
||||
Overlay* oldOverlay = _Overlay();
|
||||
Overlay* newOverlay = bitmap->Overlay();
|
||||
|
||||
if (oldOverlay != NULL && newOverlay != NULL)
|
||||
newOverlay->TakeOverToken(oldOverlay);
|
||||
}
|
||||
if (overlay != NULL && newOverlay != NULL)
|
||||
newOverlay->TakeOverToken(overlay);
|
||||
} else if (overlay != NULL)
|
||||
overlay->Hide();
|
||||
|
||||
gBitmapManager->DeleteBitmap(fViewBitmap);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user