summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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