]> git.lyx.org Git - features.git/commitdiff
Amend ad6aa8ba4b9525
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 8 Feb 2024 08:00:57 +0000 (09:00 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 8 Feb 2024 08:00:57 +0000 (09:00 +0100)
Apparently, the cell is not queried in all cases.

src/insets/InsetTabular.cpp
src/insets/InsetTabular.h

index c98308c8d4ced181b81745680f59c31af7763e38..9b4f175f740bdc58cfd12fe90355cc1710322466 100644 (file)
@@ -4518,6 +4518,25 @@ void InsetTabular::setBuffer(Buffer & buf)
 }
 
 
+bool InsetTabular::insetAllowed(InsetCode code) const
+{
+       switch (code) {
+       case FLOAT_CODE:
+       case MARGIN_CODE:
+       case MATHMACRO_CODE:
+       case WRAP_CODE:
+               return false;
+
+       case CAPTION_CODE:
+               // this is handled on cell level
+               return false;
+       
+       default:
+               return true;
+       }
+}
+
+
 bool InsetTabular::allowMultiPar() const
 {
        for (col_type c = 0; c < tabular.ncols(); ++c) {
index 7b8375f0a5c87d0212db04958d2bdb02bab92078..c38fab03850b03360d6636c543343a6f63583f46 100644 (file)
@@ -1037,6 +1037,8 @@ public:
        ///
        bool hasSettings() const override { return true; }
        ///
+       bool insetAllowed(InsetCode code) const override;
+       ///
        bool allowSpellCheck() const override { return true; }
        ///
        bool canTrackChanges() const override { return true; }