mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
row break fix for fullrow insets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6774 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
04337321d0
commit
ce4ce89ea0
@ -1,3 +1,8 @@
|
||||
2003-04-11 John Levon <levon@movementarian.org>
|
||||
|
||||
* text.C: make sure fullrow insets get wrapped to the next line,
|
||||
even when they're in a manual label
|
||||
|
||||
2003-04-10 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* text2.C (insertParagraph): make it take ParagraphList::iterator
|
||||
|
12
src/text.C
12
src/text.C
@ -782,6 +782,7 @@ LyXText::rowBreakPoint(Row const & row) const
|
||||
|
||||
// pixel width since last breakpoint
|
||||
int chunkwidth = 0;
|
||||
bool fullrow = false;
|
||||
|
||||
pos_type i = pos;
|
||||
for (; i < last; ++i) {
|
||||
@ -806,7 +807,7 @@ LyXText::rowBreakPoint(Row const & row) const
|
||||
chunkwidth += thiswidth;
|
||||
|
||||
Inset * in = pit->isInset(i) ? pit->getInset(i) : 0;
|
||||
bool fullrow = (in && (in->display() || in->needFullRow()));
|
||||
fullrow = (in && (in->display() || in->needFullRow()));
|
||||
|
||||
// break before a character that will fall off
|
||||
// the right of the row
|
||||
@ -847,7 +848,8 @@ LyXText::rowBreakPoint(Row const & row) const
|
||||
} else {
|
||||
point = i - 1;
|
||||
}
|
||||
break;
|
||||
|
||||
return point;
|
||||
}
|
||||
|
||||
if (point == last && x >= width) {
|
||||
@ -859,8 +861,10 @@ LyXText::rowBreakPoint(Row const & row) const
|
||||
point = last;
|
||||
}
|
||||
|
||||
// manual labels cannot be broken in LaTeX
|
||||
if (body_pos && point < body_pos)
|
||||
// manual labels cannot be broken in LaTeX. But we
|
||||
// want to make our on-screen rendering of footnotes
|
||||
// etc. still break
|
||||
if (!fullrow && body_pos && point < body_pos)
|
||||
point = body_pos - 1;
|
||||
|
||||
return point;
|
||||
|
Loading…
Reference in New Issue
Block a user