more rowpainter simplification

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8116 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-11-21 16:02:29 +00:00
parent 7e4b605961
commit f897f21c40

View File

@ -1020,19 +1020,8 @@ int paintText(BufferView & bv)
void paintTextInset(BufferView & bv, LyXText & text, int xo, int baseline) void paintTextInset(BufferView & bv, LyXText & text, int xo, int baseline)
{ {
RowList::iterator rit = text.firstRow(); RowList::iterator rit = text.firstRow();
RowList::iterator end = text.endRow();
ParagraphList::iterator pit = text.ownerParagraphs().begin(); ParagraphList::iterator pit = text.ownerParagraphs().begin();
paintRows(bv, text, pit, rit, xo, baseline - rit->ascent_of_text(), 0);
int y_offset = baseline - rit->ascent_of_text();
int y = y_offset;
while (rit != end && y + rit->height() <= 0) {
y += rit->height();
text.nextRow(pit, rit);
}
if (y_offset < 0)
paintRows(bv, text, pit, rit, xo, y, 0);
else
paintRows(bv, text, pit, rit, xo, y_offset, 0);
} }