]> git.lyx.org Git - features.git/blobdiff - src/Paragraph.cpp
Convenience LFUN to split an environment
[features.git] / src / Paragraph.cpp
index c7a39b6ab39da44a88ca87b237ad2c4756274af2..5095026a9241a6fc3e5532d220661e216c2e6130 100644 (file)
@@ -1461,11 +1461,12 @@ void Paragraph::Private::validate(LaTeXFeatures & features) const
                        // we have to provide all the optional arguments here, even though
                        // the last one is the only one we care about.
                        // Separate handling of optional argument inset.
-                       if (!layout_->latexargs().empty())
-                               latexArgInsets(*owner_, os, features.runparams(),
-                                              layout_->latexargs());
-                       else
-                               os << from_ascii(layout_->latexparam());
+                       if (!layout_->latexargs().empty()) {
+                               OutputParams rp = features.runparams();
+                               rp.local_font = &owner_->getFirstFontSettings(bp);
+                               latexArgInsets(*owner_, os, rp, layout_->latexargs());
+                       }
+                       os << from_ascii(layout_->latexparam());
                }
                docstring::size_type const length = ods.str().length();
                // this will output "{" at the beginning, but not at the end
@@ -2169,7 +2170,7 @@ bool Paragraph::usePlainLayout() const
 
 bool Paragraph::isPassThru() const
 {
-       return inInset().getLayout().isPassThru() || d->layout_->pass_thru;
+       return inInset().isPassThru() || d->layout_->pass_thru;
 }
 
 namespace {