commit 3ad94ec6d9c7d86fd2ec72651dcff53e3c9dcc2c
Author: Scott Kostyshak <[email protected]>
Date:   Thu Oct 7 20:37:48 2021 -0400

    Minor refactor of previous commit
    
    A bit easier to read and avoids unnecessary status.clear().
---
 src/insets/InsetTabular.cpp |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 6d5cc2e..fcf89e7 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -5548,20 +5548,21 @@ bool InsetTabular::getFeatureStatus(Cursor & cur, 
string const & s,
                case Tabular::SET_SPECIAL_MULTICOLUMN:
                case Tabular::APPEND_ROW:
                case Tabular::APPEND_COLUMN:
-               case Tabular::DELETE_ROW:
-               case Tabular::DELETE_COLUMN:
                case Tabular::COPY_ROW:
                case Tabular::COPY_COLUMN:
                case Tabular::SET_TOP_SPACE:
                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::DELETE_ROW:
+                       status.setEnabled(tabular.nrows() > 1);
+                       break;
+               case Tabular::DELETE_COLUMN:
+                       status.setEnabled(tabular.ncols() > 1);
+                       break;
+
                case Tabular::SET_TABULAR_WIDTH:
                        status.setEnabled(!tabular.rotate
                                && tabular.tabular_valignment == 
Tabular::LYX_VALIGN_MIDDLE);
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to