[LyX/master] Disable LFUN for last column/row deletion

Scott Kostyshak skostysh at lyx.org
Fri Oct 8 00:31:23 UTC 2021


commit b387ed52b121c2658abe505ae54965a884f36e88
Author: Daniel Ramoeller <d.lyx at web.de>
Date:   Sun Oct 3 06:22:48 2021 +0200

    Disable LFUN for last column/row deletion
    
    Fix for #12380.
---
 src/insets/InsetTabular.cpp |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 765388a..6d5cc2e 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -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:


More information about the lyx-cvs mailing list