From ef11936771830b8448f1a66930c494734ba5cb31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 24 Jan 2023 00:41:48 +0100 Subject: [PATCH] Apply muted visual for deleted or removed row Closes #7355 --- sao/src/view/tree.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sao/src/view/tree.js b/sao/src/view/tree.js index 74d86c9a5d..20019ce423 100644 --- a/sao/src/view/tree.js +++ b/sao/src/view/tree.js @@ -1634,8 +1634,11 @@ } } } - apply_visual( - td, this.record.expr_eval(column.attributes.visual)); + let visual = this.record.expr_eval(column.attributes.visual); + if (this.record.deleted || this.record.removed) { + visual = 'muted'; + } + apply_visual(td, visual); } this.update_visible(); } @@ -1688,13 +1691,16 @@ update_expander(); } } - apply_visual( - this.el, this.record.expr_eval(this.tree.attributes.visual)); + let visual = this.record.expr_eval(this.tree.attributes.visual); if (this.record.deleted || this.record.removed) { - this.el.css('text-decoration', 'line-through'); + if (this.record.deleted) { + this.el.css('text-decoration', 'line-through'); + } + visual = 'muted'; } else { this.el.css('text-decoration', 'inherit'); } + apply_visual(this.el, visual); }, update_visible: function() { var thead_visible = this.tree.thead.is(':visible');