Remove redundant checks for fParent before calling _InvalidateParentLayout().
This commit is contained in:
parent
182e2ee973
commit
ea0a06e213
@ -999,7 +999,7 @@ BView::Hide()
|
|||||||
}
|
}
|
||||||
fShowLevel++;
|
fShowLevel++;
|
||||||
|
|
||||||
if (fShowLevel == 1 && fParent)
|
if (fShowLevel == 1)
|
||||||
_InvalidateParentLayout();
|
_InvalidateParentLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1014,7 +1014,7 @@ BView::Show()
|
|||||||
fOwner->fLink->Flush();
|
fOwner->fLink->Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fShowLevel == 0 && fParent)
|
if (fShowLevel == 0)
|
||||||
_InvalidateParentLayout();
|
_InvalidateParentLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4718,9 +4718,8 @@ BView::InvalidateLayout(bool descendants)
|
|||||||
|
|
||||||
if (fLayoutData->fLayout)
|
if (fLayoutData->fLayout)
|
||||||
fLayoutData->fLayout->InvalidateLayout(descendants);
|
fLayoutData->fLayout->InvalidateLayout(descendants);
|
||||||
else if (fParent) {
|
else
|
||||||
_InvalidateParentLayout();
|
_InvalidateParentLayout();
|
||||||
}
|
|
||||||
|
|
||||||
if (fTopLevelView && fOwner)
|
if (fTopLevelView && fOwner)
|
||||||
fOwner->PostMessage(B_LAYOUT_WINDOW);
|
fOwner->PostMessage(B_LAYOUT_WINDOW);
|
||||||
@ -4963,7 +4962,7 @@ BView::_InvalidateParentLayout()
|
|||||||
for (int32 i = 0; i < count; i++) {
|
for (int32 i = 0; i < count; i++) {
|
||||||
fLayoutData->fLayoutItems.ItemAt(i)->Layout()->InvalidateLayout();
|
fLayoutData->fLayoutItems.ItemAt(i)->Layout()->InvalidateLayout();
|
||||||
}
|
}
|
||||||
} else if (fParent) {
|
} else {
|
||||||
fParent->InvalidateLayout();
|
fParent->InvalidateLayout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user