summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-11-07 00:17:56 +0300
committerAndrei Karas <akaras@inbox.ru>2013-11-07 00:17:56 +0300
commit1a6b16b7047b8558a5870318190b038b2b81556f (patch)
tree22d77508bfd72d2cf197f62ac3b34bd520001e06 /src/gui
parenta7b5a52cdecaed2b991ec061296b3989f9860199 (diff)
downloadplus-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.cpp16
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