Fix the UserGuide problem by always posting a full redraw when the

anchor row / offset changes


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6527 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2003-03-18 17:12:49 +00:00
parent 3ea0a9e5f4
commit 769452eb15
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-03-18 John Levon <levon@movementarian.org>
* text.C: top_y change means full repaint, fix
a drawing bug with cursor movement
2003-03-18 Alfredo Braunstein <abraunst@libero.it>
* lyxtext.h:

View File

@ -93,10 +93,18 @@ void LyXText::top_y(int newy)
lyxerr[Debug::GUI] << "setting top y = " << newy << endl;
int y = newy;
anchor_row_ = getRowNearY(y);
Row * row = getRowNearY(y);
if (row == anchor_row_ && anchor_row_offset_ == newy - y) {
lyxerr[Debug::GUI] << "top_y to same value, skipping update" << endl;
return;
}
anchor_row_ = row;
anchor_row_offset_ = newy - y;
lyxerr[Debug::GUI] << "changing reference to row: " << anchor_row_
<< " offset: " << anchor_row_offset_ << endl;
postPaint(0);
}