From ae749d90ce5bd38f4c14f76dee688c1b8cd6bf48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Fri, 19 May 2006 09:43:06 +0000 Subject: [PATCH] * updates fLastBounds in AttachedToWindow * don't do the checks for invalid rect and Window(), because Invalidate() does this for you git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17507 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/MenuBar.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/MenuBar.cpp b/src/kits/interface/MenuBar.cpp index f3ea0f8bd6..997124e9b2 100644 --- a/src/kits/interface/MenuBar.cpp +++ b/src/kits/interface/MenuBar.cpp @@ -157,6 +157,8 @@ BMenuBar::AttachedToWindow() Window()->SetKeyMenuBar(this); BMenu::AttachedToWindow(); + + *fLastBounds = Bounds(); } @@ -218,8 +220,7 @@ BMenuBar::FrameResized(float newWidth, float newHeight) BRect rect(fLastBounds->right - 2, fLastBounds->top, bounds.right, bounds.bottom); fLastBounds->Set(0, 0, newWidth, newHeight); - if (rect.IsValid() && Window() != NULL) - Invalidate(rect); + Invalidate(rect); BMenu::FrameResized(newWidth, newHeight); }