]> git.lyx.org Git - features.git/commitdiff
* src/Cursor.cpp (parbreak):
authorJürgen Spitzmüller <spitz@lyx.org>
Fri, 18 May 2007 09:21:07 +0000 (09:21 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Fri, 18 May 2007 09:21:07 +0000 (09:21 +0000)
- do not insert blank line for listings content.

* src/TextMetrics.cpp (setHeightOfRow):
        - don't use parkip in Listings insets (bug 3624)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18399 a592a061-630c-0410-9148-cb99ea01b6c8

src/Cursor.cpp
src/TextMetrics.cpp

index 7f2213179e75ce49c5d8ee4db928502ff0ee4cce..95d44b747b95473dbaf14ccbea266976dcdc348e 100644 (file)
@@ -249,8 +249,9 @@ namespace {
        {
                odocstringstream ods;
                ods << '\n';
-               // only add blank line if we're not in an ERT inset
-               if (par.ownerCode() != Inset::ERT_CODE)
+               // only add blank line if we're not in an ERT or Listings inset
+               if (par.ownerCode() != Inset::ERT_CODE 
+                   && par.ownerCode() != Inset::LISTINGS_CODE)
                        ods << '\n';
                return ods.str();
        }
index d80c66167fe2907116dee21845de89ad41ee56c3..8b841ae47985b9afcbd2ea7b18c220409994ddc1 100644 (file)
@@ -669,6 +669,7 @@ void TextMetrics::setHeightOfRow(pit_type const pit,
                if (bufparams.paragraph_separation
                    == BufferParams::PARSEP_SKIP
                        && par.ownerCode() != Inset::ERT_CODE
+                       && par.ownerCode() != Inset::LISTINGS_CODE
                        && pit > 0
                        && ((layout->isParagraph() && par.getDepth() == 0)
                            || (pars[pit - 1].layout()->isParagraph()