]> git.lyx.org Git - features.git/commitdiff
Fix bug 4067: Incorrect indentation in Description environment
authorVincent van Ravesteijn <vfr@lyx.org>
Thu, 2 Apr 2009 21:36:30 +0000 (21:36 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Thu, 2 Apr 2009 21:36:30 +0000 (21:36 +0000)
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

index dbf767f821f775cdce8192a9e4521822a6fec53f..6e22bf7852cb692a7a28309145b0da6bf0530bc2 100644 (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)