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
This commit is contained in:
@@ -972,8 +972,6 @@ ViewLayer::Draw(DrawingEngine* drawingEngine, BRegion* effectiveClipping,
|
|||||||
void
|
void
|
||||||
ViewLayer::SetHidden(bool hidden)
|
ViewLayer::SetHidden(bool hidden)
|
||||||
{
|
{
|
||||||
// TODO: test...
|
|
||||||
|
|
||||||
if (fHidden != hidden) {
|
if (fHidden != hidden) {
|
||||||
fHidden = hidden;
|
fHidden = hidden;
|
||||||
|
|
||||||
@@ -982,8 +980,10 @@ ViewLayer::SetHidden(bool hidden)
|
|||||||
bool oldVisible = fVisible;
|
bool oldVisible = fVisible;
|
||||||
UpdateVisibleDeep(fParent->IsVisible());
|
UpdateVisibleDeep(fParent->IsVisible());
|
||||||
if (oldVisible != fVisible) {
|
if (oldVisible != fVisible) {
|
||||||
// include or exclude us from the parent area
|
// Include or exclude us from the parent area, and update the
|
||||||
fParent->RebuildClipping(false);
|
// children's clipping as well when the view will be visible
|
||||||
|
fParent->RebuildClipping(!hidden);
|
||||||
|
|
||||||
if (fWindow) {
|
if (fWindow) {
|
||||||
// trigger a redraw
|
// trigger a redraw
|
||||||
BRect clippedBounds = Bounds();
|
BRect clippedBounds = Bounds();
|
||||||
|
|||||||
Reference in New Issue
Block a user