From a9f98d52a3f31693b686096c8c539e9170cb070a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 16 Feb 2006 21:58:22 +0000 Subject: [PATCH] When unhiding views, we need to update the clipping deep, or child views may be omitted. This fixes bug #181, or at least the part of it I can reproduce. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16442 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/ViewLayer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/servers/app/ViewLayer.cpp b/src/servers/app/ViewLayer.cpp index 3fee90e962..f2dadf8f93 100644 --- a/src/servers/app/ViewLayer.cpp +++ b/src/servers/app/ViewLayer.cpp @@ -972,8 +972,6 @@ ViewLayer::Draw(DrawingEngine* drawingEngine, BRegion* effectiveClipping, void ViewLayer::SetHidden(bool hidden) { - // TODO: test... - if (fHidden != hidden) { fHidden = hidden; @@ -982,8 +980,10 @@ ViewLayer::SetHidden(bool hidden) bool oldVisible = fVisible; UpdateVisibleDeep(fParent->IsVisible()); if (oldVisible != fVisible) { - // include or exclude us from the parent area - fParent->RebuildClipping(false); + // Include or exclude us from the parent area, and update the + // children's clipping as well when the view will be visible + fParent->RebuildClipping(!hidden); + if (fWindow) { // trigger a redraw BRect clippedBounds = Bounds();