]> git.lyx.org Git - lyx.git/commitdiff
honor nextnoindent
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 17 Nov 2005 09:19:02 +0000 (09:19 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 17 Nov 2005 09:19:02 +0000 (09:19 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10608 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/text.C

index 9485e25d87646bdfe02aaaf682bfa3eb7c97aa1e..9658d711d2bc61cea19eca6adaff1b6987a8153f 100644 (file)
@@ -1,3 +1,7 @@
+2005-11-15  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * text.C (leftMargin): honor the NextNoIndent tag in layouts.
+
 2005-11-17  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * lyxfunc.C:
index 1233653ed6e55ee71cbe487a0489d65a74c1135d..5c54cc342bd0b1f5611f04566b6d72d180835172 100644 (file)
@@ -474,8 +474,8 @@ int LyXText::leftMargin(pit_type const pit, pos_type const pos) const
        l_margin += font_metrics::signedWidth(tclass.leftmargin(), tclass.defaultfont());
 
        if (par.getDepth() != 0) {
-       // find the next level paragraph
-       pit_type newpar = outerHook(pit, pars_);
+               // find the next level paragraph
+               pit_type newpar = outerHook(pit, pars_);
                if (newpar != pit_type(pars_.size())) {
                        if (pars_[newpar].layout()->isEnvironment()) {
                                l_margin = leftMargin(newpar);
@@ -489,6 +489,13 @@ int LyXText::leftMargin(pit_type const pit, pos_type const pos) const
                }
        }
 
+       // This happens after sections in standard classes. The 1.3.x
+       // code compared depths too, but it does not seem necessary
+       // (JMarc)
+       if (par.layout() == tclass.defaultLayout()
+           && pit > 0 && pars_[pit - 1].layout()->nextnoindent)
+               parindent.erase();
+
        LyXFont const labelfont = getLabelFont(par);
        switch (layout->margintype) {
        case MARGIN_DYNAMIC: