]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFlex.cpp
Cocoa based Qt-4.6 needs to paint every character separately to match metrics computa...
[lyx.git] / src / insets / InsetFlex.cpp
index 6d64c3f8ead6a4f839e1a93f26e2a67b9e0d2b70..44651cc026816ac99ac1807d68e88c9fdd76d810 100644 (file)
@@ -45,6 +45,9 @@ InsetFlex::InsetFlex(InsetFlex const & in)
 
 InsetLayout const & InsetFlex::getLayout() const
 {
+       if (!buffer_)
+               return DocumentClass::plainInsetLayout();
+
        DocumentClass const & dc = buffer().params().documentClass();
        docstring const dname = from_utf8(name_); 
        if (dc.hasInsetLayout(dname))
@@ -53,6 +56,14 @@ InsetLayout const & InsetFlex::getLayout() const
 }
 
 
+bool InsetFlex::resetFontEdit() const
+{
+       if (getLayout().resetsFont())
+               return true;
+       return InsetCollapsable::resetFontEdit();
+}
+
+
 InsetLayout::InsetDecoration InsetFlex::decoration() const
 {
        InsetLayout::InsetDecoration const dec = getLayout().decoration();