this is helpful together with r30582

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30583 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2009-07-14 18:29:39 +00:00
parent ace4f7d3b8
commit 7345921eb2

View File

@ -365,12 +365,10 @@ void LaTeXFeatures::useInsetLayout(InsetLayout const & lay)
{ {
docstring const & lname = lay.name(); docstring const & lname = lay.name();
DocumentClass const & tclass = params_.documentClass(); DocumentClass const & tclass = params_.documentClass();
if (!tclass.hasInsetLayout(lname)) {
lyxerr << "LaTeXFeatures::useInsetLayout: layout `" // this is a default inset layout, nothing useful here
<< to_utf8(lname) << "' does not exist in this class" if (!tclass.hasInsetLayout(lname))
<< endl;
return; return;
}
// Is this layout already in usedInsetLayouts? // Is this layout already in usedInsetLayouts?
if (find(usedInsetLayouts_.begin(), usedInsetLayouts_.end(), lname) if (find(usedInsetLayouts_.begin(), usedInsetLayouts_.end(), lname)
!= usedInsetLayouts_.end()) != usedInsetLayouts_.end())