Fix bug 4067: Incorrect indentation in Description environment

http://www.lyx.org/trac/ticket/4067

If we are in the first pos, we are never in the body and always in the label.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29033 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-04-02 21:36:30 +00:00
parent 404f1dc80a
commit e90b43444a

View File

@ -1850,11 +1850,11 @@ int TextMetrics::leftMargin(int max_width,
case MARGIN_FIRST_DYNAMIC:
if (layout.labeltype == LABEL_MANUAL) {
if (pos >= par.beginOfBody()) {
// if we are at position 0, we are never in the body
if (pos > 0 && pos >= par.beginOfBody())
l_margin += labelfont_metrics.signedWidth(layout.leftmargin);
} else {
else
l_margin += labelfont_metrics.signedWidth(layout.labelindent);
}
} else if (pos != 0
// Special case to fix problems with
// theorems (JMarc)