fix scroll-to call when the end of a selection is to the left (in terms of locations) of the start

svn: r11444
This commit is contained in:
Matthew Flatt 2008-08-26 22:48:36 +00:00
parent 3ca429fbce
commit 27c9c2a22f

View File

@ -998,6 +998,12 @@ Bool wxMediaEdit::ScrollToPosition(long start, Bool ateol, Bool refresh,
PositionLocation(start, &topx, &topy, TRUE, ateol, TRUE);
PositionLocation(end, &botx, &boty, FALSE, ateol, TRUE);
if (botx < topx) {
/* when the end position is to the left of the start position */
topx = 0;
botx = totalWidth;
}
w = botx - topx;
h = boty - topy;