]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetCollapsable.cpp
* Lazy MathData to avoid unneeded interpretation of macro definitions
[features.git] / src / insets / InsetCollapsable.cpp
index c6ae5a5eee210c5918ee470c045a4f70716483f0..fe747bc9e8b840db7e264d4d4a53d3e0edc0372d 100644 (file)
@@ -782,6 +782,22 @@ InsetCollapsable::Decoration InsetCollapsable::decoration() const
 }
 
 
+bool InsetCollapsable::isMacroScope(Buffer const & buf) const
+{
+       // layout_ == 0 leads to no latex output, so ignore 
+       // the macros outside
+       if (!layout_)
+               return true;
+
+       // see InsetCollapsable::latex(...) below. In these case
+       // an environment is opened there
+       if (!layout_->latexname.empty())
+               return true;
+
+       return false;
+}
+
+
 int InsetCollapsable::latex(Buffer const & buf, odocstream & os,
                          OutputParams const & runparams) const
 {