From: Vincent van Ravesteijn Date: Thu, 2 Apr 2009 21:36:30 +0000 (+0000) Subject: Fix bug 4067: Incorrect indentation in Description environment X-Git-Tag: 2.0.0~6965 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e90b43444afa71746d9820b96ff3b0b8708e8e21;p=features.git 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 --- diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index dbf767f821..6e22bf7852 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -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)