[LyX/master] Cross out ct-deleted tabular rows/columns in workarea

Juergen Spitzmueller spitz at lyx.org
Wed Jan 15 07:21:00 UTC 2020


commit a940e9d709c16cefca66c473a3ea6f62f39f7565
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Wed Jan 15 08:37:35 2020 +0100

    Cross out ct-deleted tabular rows/columns in workarea
---
 src/insets/InsetTabular.cpp |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index dc8645a..2b23c89 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -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.


More information about the lyx-cvs mailing list