commit fe1283c887636b055c953b03d8d73e04139706ab
Author: Juergen Spitzmueller <[email protected]>
Date:   Mon Oct 27 18:24:59 2025 +0100

    Fix cell color clearance
    
    (cherry picked from commit fe261bc584e487b896cc521f552ec5c51a12209f)
---
 src/insets/InsetTabular.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 14f2e4b557..63bbd5838a 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -1154,11 +1154,17 @@ void Tabular::updateIndexes()
                                    && getOddRowColor() != "default" && 
!getOddRowColor().empty())
                                        colors.push_back(getOddRowColor());
                        }
-                       for (auto const & color : colors)
+                       bool have_col = false;
+                       for (auto const & color : colors) {
                                if (color != "default" && 
lcolor.isKnownLyXName(color)) {
+                                       have_col = true;
                                        
cell_info[row][column].inset->setBackgroundColor(color);
                                        break;
                                }
+                       }
+                       if (!have_col)
+                               // assure all colors are cleared
+                               
cell_info[row][column].inset->setBackgroundColor("none");
                        if (buffer().params().track_changes) {
                                if (row_info[row].change.changed())
                                        
cell_info[row][column].inset->setChange(row_info[row].change);
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to