From ea0a06e213b2d4ac041c91c4a85d790f33595c2e Mon Sep 17 00:00:00 2001 From: Alex Wilson Date: Tue, 6 Dec 2011 22:35:46 -0700 Subject: [PATCH] Remove redundant checks for fParent before calling _InvalidateParentLayout(). --- src/kits/interface/View.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/kits/interface/View.cpp b/src/kits/interface/View.cpp index d7fed3fbc5..2933e7aaf9 100644 --- a/src/kits/interface/View.cpp +++ b/src/kits/interface/View.cpp @@ -999,7 +999,7 @@ BView::Hide() } fShowLevel++; - if (fShowLevel == 1 && fParent) + if (fShowLevel == 1) _InvalidateParentLayout(); } @@ -1014,7 +1014,7 @@ BView::Show() fOwner->fLink->Flush(); } - if (fShowLevel == 0 && fParent) + if (fShowLevel == 0) _InvalidateParentLayout(); } @@ -4718,9 +4718,8 @@ BView::InvalidateLayout(bool descendants) if (fLayoutData->fLayout) fLayoutData->fLayout->InvalidateLayout(descendants); - else if (fParent) { + else _InvalidateParentLayout(); - } if (fTopLevelView && fOwner) fOwner->PostMessage(B_LAYOUT_WINDOW); @@ -4963,7 +4962,7 @@ BView::_InvalidateParentLayout() for (int32 i = 0; i < count; i++) { fLayoutData->fLayoutItems.ItemAt(i)->Layout()->InvalidateLayout(); } - } else if (fParent) { + } else { fParent->InvalidateLayout(); } }