From 96007521ba20250db0ed05e4d6117077690637db Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 1 Dec 2012 20:29:04 +0300 Subject: add batch draw to equipment window. --- src/gui/widgets/window.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/gui/widgets/window.cpp') diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index ba6d982c8..8c1f63e29 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -54,6 +54,7 @@ Window::Window(const std::string &caption, const bool modal, mDefaultY(0), mDefaultWidth(0), mDefaultHeight(0), + mLastRedraw(true), mGrip(nullptr), mParent(parent), mLayout(nullptr), @@ -200,6 +201,7 @@ void Window::draw(gcn::Graphics *graphics) } if (mRedraw) { + mLastRedraw = true; mRedraw = false; update = true; mVertexes->clear(); @@ -229,7 +231,10 @@ void Window::draw(gcn::Graphics *graphics) g->calcTile(mVertexes, mGrip, mGripRect.x, mGripRect.y); } - + else + { + mLastRedraw = false; + } g->drawTile(mVertexes); } else -- cgit v1.2.3-60-g2f50