From: Vincent van Ravesteijn Date: Wed, 5 May 2010 21:15:15 +0000 (+0000) Subject: Disallow InsetMarginals in InsetTabulars. X-Git-Tag: 2.0.0~3291 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5e978cf02c23258a8410ed0c801d3c1c62f5b945;p=features.git Disallow InsetMarginals in InsetTabulars. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34373 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index c8ef61183d..f17275ddc3 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -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; + } }