Disallow InsetMarginals in InsetTabulars.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34373 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2010-05-05 21:15:15 +00:00
parent 863e1eb35b
commit 5e978cf02c

View File

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