Uncommented invalidation of the area occupied by the views when they are added/removed from the tree. This fixes a couple of problems, I can't say the bug # because bugzilla is down ATM. Why was this code commented out? Stephan ?

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18607 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2006-08-24 14:09:15 +00:00
parent f7402e702b
commit 1ff0b28a93
+22 -22
View File
@@ -231,17 +231,17 @@ ViewLayer::AddChild(ViewLayer* layer)
if (fWindow) { if (fWindow) {
layer->AttachedToWindow(fWindow); layer->AttachedToWindow(fWindow);
// if (layer->IsVisible()) { if (layer->IsVisible()) {
// // trigger redraw // trigger redraw
// BRect clippedFrame = layer->Frame(); BRect clippedFrame = layer->Frame();
// ConvertToVisibleInTopView(&clippedFrame); ConvertToVisibleInTopView(&clippedFrame);
// BRegion* dirty = fWindow->GetRegion(); BRegion* dirty = fWindow->GetRegion();
// if (dirty) { if (dirty) {
// dirty->Set(clippedFrame); dirty->Set(clippedFrame);
// fWindow->MarkContentDirtyAsync(*dirty); fWindow->MarkContentDirtyAsync(*dirty);
// fWindow->RecycleRegion(dirty); fWindow->RecycleRegion(dirty);
// } }
// } }
} }
} }
@@ -286,17 +286,17 @@ ViewLayer::RemoveChild(ViewLayer* layer)
if (fWindow) { if (fWindow) {
layer->DetachedFromWindow(); layer->DetachedFromWindow();
// if (fVisible && layer->IsVisible()) { if (fVisible && layer->IsVisible()) {
// // trigger redraw // trigger redraw
// BRect clippedFrame = layer->Frame(); BRect clippedFrame = layer->Frame();
// ConvertToVisibleInTopView(&clippedFrame); ConvertToVisibleInTopView(&clippedFrame);
// BRegion* dirty = fWindow->GetRegion(); BRegion* dirty = fWindow->GetRegion();
// if (dirty) { if (dirty) {
// dirty->Set(clippedFrame); dirty->Set(clippedFrame);
// fWindow->MarkContentDirtyAsync(*dirty); fWindow->MarkContentDirtyAsync(*dirty);
// fWindow->RecycleRegion(dirty); fWindow->RecycleRegion(dirty);
// } }
// } }
} }
return true; return true;