From e0c563da5b7c5a7008bf9c185bc7b30b49e222f1 Mon Sep 17 00:00:00 2001 From: Jingwood Date: Tue, 3 Mar 2020 19:21:54 +0900 Subject: [PATCH] fix bug that TextOverflow cannot be disabled, #301 --- ReoGrid/Views/CellsViewport.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReoGrid/Views/CellsViewport.cs b/ReoGrid/Views/CellsViewport.cs index 069c887c..79ac7f70 100644 --- a/ReoGrid/Views/CellsViewport.cs +++ b/ReoGrid/Views/CellsViewport.cs @@ -854,9 +854,9 @@ internal void DrawCellText(CellDrawingContext dc, Cell cell) Rectangle clipRect = new Rectangle(this.ViewLeft * this.scaleFactor, cell.Top * this.scaleFactor, this.Width, cellScaledHeight); - bool needWidthClip = (cell.IsMergedCell || cell.InnerStyle.TextWrapMode == TextWrapMode.WordBreak); + bool needWidthClip = cell.IsMergedCell || cell.InnerStyle.TextWrapMode == TextWrapMode.WordBreak || dc.AllowCellClip; - if (!needWidthClip && dc.AllowCellClip) + if (!needWidthClip) { if (cell.InternalCol < this.sheet.cols.Count - 1) {