mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
fix crash with proof-type box markers
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3245 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
03a76a07ce
commit
721b2b3972
@ -1,3 +1,9 @@
|
|||||||
|
2001-12-18 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||||
|
|
||||||
|
* text.C (paintLastRow): use the label font instead of the font of
|
||||||
|
the last character to compute the size of *_BOX. This makes more
|
||||||
|
sense and avoids a crash with empty paragraphs.
|
||||||
|
Use Painter::rectangle to draw EMPTY_BOX.
|
||||||
2001-12-19 Juergen Vigna <jug@sad.it>
|
2001-12-19 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
* undo_funcs.C (textHandleUndo): fixed setting of inset_owner of
|
* undo_funcs.C (textHandleUndo): fixed setting of inset_owner of
|
||||||
|
10
src/text.C
10
src/text.C
@ -3510,7 +3510,7 @@ void LyXText::paintLastRow(DrawRowParams & p)
|
|||||||
case END_LABEL_BOX:
|
case END_LABEL_BOX:
|
||||||
case END_LABEL_FILLED_BOX:
|
case END_LABEL_FILLED_BOX:
|
||||||
{
|
{
|
||||||
LyXFont const font = getFont(buffer, par, last);
|
LyXFont const font = getLabelFont(buffer, par);
|
||||||
int const size = int(0.75 * lyxfont::maxAscent(font));
|
int const size = int(0.75 * lyxfont::maxAscent(font));
|
||||||
int const y = (p.yo + p.row->baseline()) - size;
|
int const y = (p.yo + p.row->baseline()) - size;
|
||||||
int x = is_rtl ? LYX_PAPER_MARGIN : ww - LYX_PAPER_MARGIN - size;
|
int x = is_rtl ? LYX_PAPER_MARGIN : ww - LYX_PAPER_MARGIN - size;
|
||||||
@ -3519,12 +3519,10 @@ void LyXText::paintLastRow(DrawRowParams & p)
|
|||||||
x += (size - p.row->fill() + 1) * (is_rtl ? -1 : 1);
|
x += (size - p.row->fill() + 1) * (is_rtl ? -1 : 1);
|
||||||
|
|
||||||
if (endlabel == END_LABEL_BOX) {
|
if (endlabel == END_LABEL_BOX) {
|
||||||
p.pain->line(x, y, x, y + size, LColor::eolmarker);
|
p.pain->rectangle(x, y, size, size, LColor::eolmarker);
|
||||||
p.pain->line(x + size, y, x + size , y + size, LColor::eolmarker);
|
|
||||||
p.pain->line(x, y, x + size, y, LColor::eolmarker);
|
|
||||||
p.pain->line(x, y + size, x + size, y + size, LColor::eolmarker);
|
|
||||||
} else {
|
} else {
|
||||||
p.pain->fillRectangle(x, y, size, size, LColor::eolmarker);
|
p.pain->fillRectangle(x, y, size, size,
|
||||||
|
LColor::eolmarker);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user