From ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 30 Aug 2017 22:51:23 +0300 Subject: Move some variables to better scope. --- src/gui/widgets/window.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/gui/widgets/window.cpp') diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 9d9385f8d..b192bad35 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -642,8 +642,6 @@ void Window::setResizable(const bool r) void Window::widgetResized(const Event &event A_UNUSED) { - const Rect area = getChildrenArea(); - if (mGrip != nullptr) { mGripRect.x = mDimension.width - mGrip->getWidth() - mGripPadding; @@ -652,6 +650,7 @@ void Window::widgetResized(const Event &event A_UNUSED) if (mLayout != nullptr) { + const Rect area = getChildrenArea(); int w = area.width; int h = area.height; mLayout->reflow(w, h); -- cgit v1.2.3-70-g09d2