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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user