If the current TextMetrics does not contain the paragraph the cursor is in, the screen is recentered. Now, the current TextMetrics should be updated to one that does contain the cursor (as we have just recentered)..

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28342 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-02-03 23:30:26 +00:00
parent 84e9ad449e
commit a24b258abb

View File

@ -422,8 +422,10 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
BufferView * bv = &cur.bv();
TextMetrics & tm = bv->textMetrics(this);
if (!tm.contains(cur.pit()))
if (!tm.contains(cur.pit())) {
lyx::dispatch(FuncRequest(LFUN_SCREEN_RECENTER));
tm = bv->textMetrics(this);
}
// FIXME: We use the update flag to indicates wether a singlePar or a
// full screen update is needed. We reset it here but shall we restore it