mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
partial fix for anchor_row problems
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7554 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c83eaea4d2
commit
9a7cef54a6
@ -173,12 +173,11 @@ void XScreen::expose(int x, int y, int w, int h)
|
|||||||
|
|
||||||
void XScreen::draw(LyXText * text, BufferView * bv, unsigned int y)
|
void XScreen::draw(LyXText * text, BufferView * bv, unsigned int y)
|
||||||
{
|
{
|
||||||
int const old_first = text->top_y();
|
|
||||||
text->top_y(y);
|
text->top_y(y);
|
||||||
|
|
||||||
// make a dumb new-draw
|
// make a dumb new-draw
|
||||||
drawFromTo(text, bv, 0, owner_.workHeight(), 0, 0);
|
//drawFromTo(text, bv, 0, owner_.workHeight(), 0, 0);
|
||||||
expose(0, 0, owner_.workWidth(), owner_.workHeight());
|
//expose(0, 0, owner_.workWidth(), owner_.workHeight());
|
||||||
|
|
||||||
XSync(fl_get_display(), 0);
|
XSync(fl_get_display(), 0);
|
||||||
}
|
}
|
||||||
|
12
src/text2.C
12
src/text2.C
@ -559,9 +559,10 @@ void LyXText::redoParagraph(ParagraphList::iterator pit)
|
|||||||
RowList::iterator end = pit->rows.end();
|
RowList::iterator end = pit->rows.end();
|
||||||
|
|
||||||
// remove rows of paragraph
|
// remove rows of paragraph
|
||||||
for ( ; rit != end; ++rit) {
|
int anchor_cnt = -1;
|
||||||
|
for (int i = 0; rit != end; ++rit, ++i) {
|
||||||
if (rit == anchor_row_)
|
if (rit == anchor_row_)
|
||||||
anchor_row_ = endRow();
|
anchor_cnt = i;
|
||||||
height -= rit->height();
|
height -= rit->height();
|
||||||
}
|
}
|
||||||
pit->rows.clear();
|
pit->rows.clear();
|
||||||
@ -588,6 +589,13 @@ void LyXText::redoParagraph(ParagraphList::iterator pit)
|
|||||||
setHeightOfRow(pit, tmprow);
|
setHeightOfRow(pit, tmprow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (anchor_cnt == -1) {
|
||||||
|
if (anchor_cnt >= pit->rows.size())
|
||||||
|
anchor_cnt = pit->rows.size();
|
||||||
|
anchor_row_ = pit->rows.begin();
|
||||||
|
advance(anchor_row_, anchor_cnt);
|
||||||
|
}
|
||||||
|
|
||||||
//lyxerr << "redoParagraph: " << pit->rows.size() << " rows\n";
|
//lyxerr << "redoParagraph: " << pit->rows.size() << " rows\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user