From 005d429599088b523e4f62326824c7fb51ba9c63 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 21 Apr 2011 06:09:30 +0300 Subject: Fix draw issue in SDL after vertex precalculation. --- src/gui/widgets/window.cpp | 13 ++++++++++++- 1 file changed, 12 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 72530db8f..df8599b95 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -131,10 +131,12 @@ void Window::draw(gcn::Graphics *graphics) return; Graphics *g = static_cast(graphics); + bool update = false; if (mRedraw) { mRedraw = false; + update = true; g->calcWindow(mVertexes, 0, 0, getWidth(), getHeight(), mSkin->getBorder()); } @@ -176,7 +178,16 @@ void Window::draw(gcn::Graphics *graphics) } } - drawChildren(graphics); + if (update) + { + g->setRedraw(update); + drawChildren(graphics); + g->setRedraw(false); + } + else + { + drawChildren(graphics); + } } void Window::setContentSize(int width, int height) -- cgit v1.2.3-60-g2f50