diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-04-21 06:09:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-04-21 06:09:30 +0300 |
commit | 005d429599088b523e4f62326824c7fb51ba9c63 (patch) | |
tree | dccce15cf132bae28c85be897d5f7cc33299ea17 /src/gui/widgets/window.cpp | |
parent | 8037d33c9f429d4c0322da383cdda46776c3c14e (diff) | |
download | manaverse-005d429599088b523e4f62326824c7fb51ba9c63.tar.gz manaverse-005d429599088b523e4f62326824c7fb51ba9c63.tar.bz2 manaverse-005d429599088b523e4f62326824c7fb51ba9c63.tar.xz manaverse-005d429599088b523e4f62326824c7fb51ba9c63.zip |
Fix draw issue in SDL after vertex precalculation.
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r-- | src/gui/widgets/window.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
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*>(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) |