]> git.lyx.org Git - features.git/commitdiff
Cross out ct-deleted tabular rows/columns in workarea
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 15 Jan 2020 07:37:35 +0000 (08:37 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:51 +0000 (15:48 +0200)
src/insets/InsetTabular.cpp

index dc8645a94944f1c76993cb9bff2d39a8de969fc6..2b23c8955ac7b59beb1fdc58fd53cc36163df0f2 100644 (file)
@@ -4473,6 +4473,9 @@ void InsetTabular::draw(PainterInfo & pi, int x, int y) const
        bool const original_selection_state = pi.selected;
 
        idx_type idx = 0;
+       
+       // Save change status
+       Change tab_change = pi.change;
 
        int yy = y + tabular.offsetVAlignment();
        for (row_type r = 0; r < tabular.nrows(); ++r) {
@@ -4488,7 +4491,15 @@ void InsetTabular::draw(PainterInfo & pi, int x, int y) const
                                continue;
                        }
 
+                       // Mark deleted rows/columns
                        pi.selected |= isCellSelected(cur, r, c);
+                       if (tabular.column_info[c].change.changed())
+                               pi.change = tabular.column_info[c].change;
+                       else if (tabular.row_info[r].change.changed())
+                               pi.change = tabular.row_info[r].change;
+                       else
+                               pi.change = tab_change;
+
                        int const cx = nx + tabular.textHOffset(idx);
                        int const cy = yy + tabular.textVOffset(idx);
                        // Cache the Inset position.