From e90b43444afa71746d9820b96ff3b0b8708e8e21 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Thu, 2 Apr 2009 21:36:30 +0000 Subject: [PATCH] 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 --- src/TextMetrics.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 2.39.2