]> git.lyx.org Git - features.git/commitdiff
Disable LFUN for last column/row deletion
authorDaniel Ramoeller <d.lyx@web.de>
Sun, 3 Oct 2021 04:22:48 +0000 (06:22 +0200)
committerScott Kostyshak <skostysh@lyx.org>
Fri, 8 Oct 2021 00:40:12 +0000 (20:40 -0400)
Fix for #12380.

src/insets/InsetTabular.cpp

index 765388a95909305a379227b4e5b9e5ba76467450..6d5cc2edaa5f6f1147b404b57fd04defc03e3103 100644 (file)
@@ -5556,6 +5556,10 @@ bool InsetTabular::getFeatureStatus(Cursor & cur, string const & s,
                case Tabular::SET_BOTTOM_SPACE:
                case Tabular::SET_INTERLINE_SPACE:
                        status.clear();
+                       if (action == Tabular::DELETE_ROW)
+                               status.setEnabled(tabular.nrows() > 1);
+                       else if (action == Tabular::DELETE_COLUMN)
+                               status.setEnabled(tabular.ncols() > 1);
                        return true;
 
                case Tabular::SET_TABULAR_WIDTH: