]> git.lyx.org Git - features.git/commitdiff
Disallow InsetMarginals in InsetTabulars.
authorVincent van Ravesteijn <vfr@lyx.org>
Wed, 5 May 2010 21:15:15 +0000 (21:15 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Wed, 5 May 2010 21:15:15 +0000 (21:15 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34373 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetTabular.cpp

index c8ef61183d903de2f64372a27ded1d836b24b69b..f17275ddc3c140862ec574eca193504d8b0b6688 100644 (file)
@@ -3131,11 +3131,18 @@ void InsetTabular::setBuffer(Buffer & buf)
 
 bool InsetTabular::insetAllowed(InsetCode code) const
 {
-       if (code == MATHMACRO_CODE
-               || (code == CAPTION_CODE && !tabular.is_long_tabular))
+       switch (code)
+       {
+       case MARGIN_CODE:
+       case MATHMACRO_CODE:
                return false;
 
-       return true;
+       case CAPTION_CODE:
+               return tabular.is_long_tabular;
+
+       default:
+               return true;
+       }
 }