After the first call to BView::InvalidateLayout() further invocations don't

invoke the layout's InvalidateLayout() anymore. This could cause problems when
the layout caches layout related information and also updates those on calls
other than LayoutView(). A call to such a method after an InvalidateLayout()
would mark the cached info valid and the layout would use the cached info
until the first InvalidateLayout() after the next LayoutView(), even if
BView::InvalidateLayout() had been called again in the meantime.

* Introduced a new method BView::ResetLayoutInvalidation(), which must be
  called by layout implementations whenever they have updated their cached
  information and need further InvalidateLayout() notifications.
* Adjusted the existing layout implementations to use the method.

Fixes bug #4047.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31316 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-06-29 14:18:12 +00:00
parent 23eb9a9e82
commit a0747aad3b
5 changed files with 45 additions and 12 deletions
+2 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2006, Haiku.
* Copyright 2001-2009, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -532,6 +532,7 @@ public:
void EnableLayoutInvalidation();
void DisableLayoutInvalidation();
bool IsLayoutValid() const;
void ResetLayoutInvalidation();
BLayoutContext* LayoutContext() const;