From 6736b21a2ab4105bd28716179bff3ccb319589d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 2 May 2006 21:22:56 +0000 Subject: [PATCH] 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 --- src/servers/app/ViewLayer.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/servers/app/ViewLayer.cpp b/src/servers/app/ViewLayer.cpp index cf7650cc35..17594d00b3 100644 --- a/src/servers/app/ViewLayer.cpp +++ b/src/servers/app/ViewLayer.cpp @@ -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); }