diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-11-07 00:17:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-11-07 00:17:56 +0300 |
commit | 1a6b16b7047b8558a5870318190b038b2b81556f (patch) | |
tree | 22d77508bfd72d2cf197f62ac3b34bd520001e06 /src/gui | |
parent | a7b5a52cdecaed2b991ec061296b3989f9860199 (diff) | |
download | plus-1a6b16b7047b8558a5870318190b038b2b81556f.tar.gz plus-1a6b16b7047b8558a5870318190b038b2b81556f.tar.bz2 plus-1a6b16b7047b8558a5870318190b038b2b81556f.tar.xz plus-1a6b16b7047b8558a5870318190b038b2b81556f.zip |
redraw cached children if scrollarea position was changed.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index 948014cca..e97dad715 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -315,7 +315,19 @@ void ScrollArea::draw(gcn::Graphics *graphics) } updateAlpha(); - drawChildren(graphics); + + if (mRedraw) + { + Graphics *g = static_cast<Graphics *const>(graphics); + const bool redraw = g->getRedraw(); + g->setRedraw(true); + drawChildren(graphics); + g->setRedraw(redraw); + } + else + { + drawChildren(graphics); + } mRedraw = false; BLOCK_END("ScrollArea::draw") } @@ -787,6 +799,7 @@ void ScrollArea::mouseReleased(gcn::MouseEvent& event) } } gcn::ScrollArea::mouseReleased(event); + mRedraw = true; } void ScrollArea::mouseDragged(gcn::MouseEvent &event) @@ -830,6 +843,7 @@ void ScrollArea::mouseDragged(gcn::MouseEvent &event) } event.consume(); + mRedraw = true; } gcn::Rectangle ScrollArea::getVerticalBarDimension() const |