When scrolling a focussed board, inval everything. Otherwise border

cells scroll into the center drawn as border.
This commit is contained in:
ehouse 2007-01-21 18:05:25 +00:00
parent 6ed6fe4976
commit 15acf8c8bb

View file

@ -1062,10 +1062,18 @@ static void
scrollIfCan( BoardCtxt* board )
{
if ( board->yOffset != board->prevYScrollOffset ) {
if ( board->focussed == OBJ_BOARD && !board->focusHasDived ) {
/* an edge case. Just brute force it. */
board_invalAllTiles( board );
} else {
XP_Rect scrollR = board->boardBounds;
XP_Bool scrolled;
XP_S16 dist;
/* If there's a focus-rect drawn on the board, we need to inval any
row of it that's going to get scrolled into the center since it
needs to be redrawn without the border. */
invalSelTradeWindow( board );
dist = (board->yOffset - board->prevYScrollOffset)
* board->boardVScale;
@ -1080,7 +1088,7 @@ scrollIfCan( BoardCtxt* board )
} else {
board_invalAll( board );
}
}
board->prevYScrollOffset = board->yOffset;
}
} /* scrollIfCan */