[LyX/master] Amend 9b7dc5df8fda8

Juergen Spitzmueller <[email protected]> Thu, 30 Apr 2026 08:59:13 +0000
Newsgroups gmane.editors.lyx.cvs
Message-ID <[email protected]>
commit d1d456e45a0d2001a8c9a33c6c607b4f8f5ea7f2
Author: Juergen Spitzmueller <[email protected]>
Date:   Thu Apr 30 10:58:38 2026 +0200

    Amend 9b7dc5df8fda8
    
    This is only stylistics, so no need to backport this part.
---
 src/insets/InsetTabular.cpp | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index bfba04baa7..a2cb633a53 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -1146,12 +1146,12 @@ void Tabular::updateIndexes()
 			if (realrow % 2 == 0) {
 				// even row
 				if (getAltRowColorsStart() <= realrow && getEvenRowColor() != "none"
-				     && getEvenRowColor() != "default" && !getEvenRowColor().empty())
+				     && getEvenRowColor() != "default")
 					colors.push_back(getEvenRowColor());
 			} else {
 				// odd row
 				if (getAltRowColorsStart() <= realrow && getOddRowColor() != "none"
-				    && getOddRowColor() != "default" && !getOddRowColor().empty())
+				    && getOddRowColor() != "default")
 					colors.push_back(getOddRowColor());
 			}
 			bool have_col = false;
@@ -2861,7 +2861,7 @@ string Tabular::getBorderColor() const
 
 string Tabular::getOddRowColor() const
 {
-	if (odd_row_color == "default")
+	if (odd_row_color.empty() || odd_row_color == "default")
 		return buffer().masterParams().table_odd_row_color == "none"
 				? string()
 				: buffer().masterParams().table_odd_row_color;
@@ -2870,7 +2870,7 @@ string Tabular::getOddRowColor() const
 
 string Tabular::getEvenRowColor() const
 {
-	if (even_row_color == "default")
+	if (even_row_color.empty() || even_row_color == "default")
 		return buffer().masterParams().table_even_row_color == "none"
 				? string()
 				: buffer().masterParams().table_even_row_color;
@@ -3735,7 +3735,6 @@ void Tabular::latex(otexstream & os, OutputParams const & runparams) const
 	bool have_local_alt_row_colors = false;
 	// switch on alternating row colors if requested
 	if ((getOddRowColor() != "default" || getEvenRowColor() != "default")
-	    && (!getOddRowColor().empty() && !getEvenRowColor().empty())
 	    && (odd_row_color != "default" || even_row_color != "default")) {
 		have_local_alt_row_colors = true;
 		string const orc = getOddRowColor() == "none"
@@ -4757,8 +4756,7 @@ void Tabular::validate(LaTeXFeatures & features) const
 		if (columnColor(col) != "default")
 			used_colors.push_back(columnColor(col));
 	}
-	if ((!getOddRowColor().empty() && getOddRowColor() != "default")
-	    || (!getEvenRowColor().empty() && getEvenRowColor() != "default")) {
+	if (getOddRowColor() != "default" || getEvenRowColor() != "default") {
 		if (!features.isAvailableAtLeastFrom("colortbl", 2022, 6, 20)) {
 			// previous to this colortbl version, the feature
 			// was part of xcolor
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs