diff options
Diffstat (limited to 'src/gui/widgets/scrollarea.cpp')
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index 2cc745ccd..a78048314 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -50,7 +50,9 @@ ScrollArea::ScrollArea(): mVertexes(new GraphicsVertexes()), mRedraw(true), mXOffset(0), - mYOffset(0) + mYOffset(0), + mDrawWidth(0), + mDrawHeight(0) { addWidgetListener(this); init(); @@ -65,9 +67,11 @@ ScrollArea::ScrollArea(gcn::Widget *widget): mVertexes(new GraphicsVertexes()), mRedraw(true), mXOffset(0), - mYOffset(0) + mYOffset(0), + mDrawWidth(0), + mDrawHeight(0) { - addWidgetListener(this); +// addWidgetListener(this); init(); } @@ -339,6 +343,12 @@ void ScrollArea::drawFrame(gcn::Graphics *graphics) mXOffset = rect.xOffset; mYOffset = rect.yOffset; } + else if (rect.width != mDrawWidth || rect.height != mDrawHeight) + { + recalc = true; + mDrawWidth = rect.width; + mDrawHeight = rect.height; + } } if (recalc) |