The layout checks the target view now if the layout invalidation has been disabled in the view.

This commit is contained in:
czeidler 2012-05-10 10:32:30 +12:00
parent 57a2ea0d54
commit 31f768577e
3 changed files with 12 additions and 0 deletions

View File

@ -554,6 +554,7 @@ public:
void EnableLayoutInvalidation(); void EnableLayoutInvalidation();
void DisableLayoutInvalidation(); void DisableLayoutInvalidation();
bool IsLayoutInvalidationDisabled();
bool IsLayoutValid() const; bool IsLayoutValid() const;
void ResetLayoutInvalidation(); void ResetLayoutInvalidation();

View File

@ -301,6 +301,8 @@ BLayout::InvalidateLayout(bool children)
// printf("BLayout(%p)::InvalidateLayout(%i) : state %x, disabled %li\n", // printf("BLayout(%p)::InvalidateLayout(%i) : state %x, disabled %li\n",
// this, children, (unsigned int)fState, fInvalidationDisabled); // this, children, (unsigned int)fState, fInvalidationDisabled);
if (fTarget && fTarget->IsLayoutInvalidationDisabled())
return;
if (fInvalidationDisabled > 0 if (fInvalidationDisabled > 0
|| (fState & B_LAYOUT_INVALIDATION_ILLEGAL) != 0) { || (fState & B_LAYOUT_INVALIDATION_ILLEGAL) != 0) {
return; return;

View File

@ -4744,6 +4744,15 @@ BView::DisableLayoutInvalidation()
} }
bool
BView::IsLayoutInvalidationDisabled()
{
if (fLayoutData->fLayoutInvalidationDisabled > 0)
return true;
return false;
}
bool bool
BView::IsLayoutValid() const BView::IsLayoutValid() const
{ {