X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetfootlike.C;h=edfd20dafbfde25e8841302eeef8e640de810b2e;hb=b00e1315fe4da81da67f63d70e455cda167afab9;hp=141cde152d6d2efe459210d0895c77d8767c72f2;hpb=487f6eb3b43746460d090f643cd1e39f2d93a74b;p=lyx.git diff --git a/src/insets/insetfootlike.C b/src/insets/insetfootlike.C index 141cde152d..edfd20dafb 100644 --- a/src/insets/insetfootlike.C +++ b/src/insets/insetfootlike.C @@ -29,25 +29,31 @@ InsetFootlike::InsetFootlike() font.decSize(); font.setColor(LColor::collapsable); setLabelFont(font); - setAutoCollapse(false); } -void InsetFootlike::write(Buffer const * buf, std::ostream & os) const +InsetFootlike::InsetFootlike(InsetFootlike const & in, bool same_id) + : InsetCollapsable(in, same_id) { - os << getInsetName() << "\n"; - InsetCollapsable::write(buf, os); + LyXFont font(LyXFont::ALL_SANE); + font.decSize(); + font.decSize(); + font.setColor(LColor::collapsable); + setLabelFont(font); } -bool InsetFootlike::insertInsetAllowed(Inset * in) const +void InsetFootlike::write(Buffer const * buf, std::ostream & os) const { - return insertInsetAllowed(in->lyxCode()); + os << getInsetName() << "\n"; + InsetCollapsable::write(buf, os); } -bool InsetFootlike::insertInsetAllowed(Inset::Code code) const + +bool InsetFootlike::insetAllowed(Inset::Code code) const { - if ((code == Inset::FOOT_CODE) || (code == Inset::MARGIN_CODE)) + if ((code == Inset::FOOT_CODE) || (code == Inset::MARGIN_CODE) + || (code ==Inset::FLOAT_CODE)) return false; - return InsetCollapsable::insertInsetAllowed(code); + return InsetCollapsable::insetAllowed(code); }