]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCollapsable.cpp
Manage the initial setting of Default or Plain Layout more simply.
[lyx.git] / src / insets / InsetCollapsable.cpp
index 123e48fa0d5936871474cb266f71c45fd0b52d3a..e2fbb3600c66adaaa727b7657a27fc84400f94ac 100644 (file)
@@ -102,16 +102,14 @@ InsetCollapsable::Geometry InsetCollapsable::geometry() const
 }
 
 
-InsetCollapsable::InsetCollapsable(Buffer const & buf)
-       : InsetText(buf), status_(Inset::Open),
+InsetCollapsable::InsetCollapsable(Buffer const & buf, InsetText::UsePlain ltype)
+       : InsetText(buf, ltype), status_(Inset::Open),
          openinlined_(false), mouse_hover_(false)
 {
-       DocumentClass const & dc = buf.params().documentClass();
-       setLayout(&dc);
+       setLayout(&buf.params().documentClass());
        setAutoBreakRows(true);
        setDrawFrame(true);
        setFrameColor(Color_collapsableframe);
-       paragraphs().back().setPlainLayout(dc); 
 }
 
 
@@ -623,8 +621,7 @@ bool InsetCollapsable::allowMultiPar() const
 
 void InsetCollapsable::resetParagraphsFont()
 {
-       Font font;
-       font.fontInfo() = inherit_font;
+       Font font(inherit_font, buffer().params().language);
        if (layout_->isForceLtr())
                font.setLanguage(latex_language);
        if (layout_->isPassThru()) {