From 5d1ba18b7406d5b9ad68907c143318abea08cea3 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sat, 11 Aug 2018 10:38:31 +0000 Subject: [PATCH] fpspreadsheet: Fix minor bug in WorksheetGrid's row height calculation. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6592 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/source/visual/fpspreadsheetgrid.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/fpspreadsheet/source/visual/fpspreadsheetgrid.pas b/components/fpspreadsheet/source/visual/fpspreadsheetgrid.pas index c60de0429..56c9b76e7 100644 --- a/components/fpspreadsheet/source/visual/fpspreadsheetgrid.pas +++ b/components/fpspreadsheet/source/visual/fpspreadsheetgrid.pas @@ -5766,7 +5766,10 @@ begin lRow^.Height := CalcRowHeightToSheet(round(h / ZoomFactor)); end else // If autocalc mode is off we just take the row height from the row record - h := round(CalcRowHeightFromSheet(lRow^.Height) * ZoomFactor); + case lRow^.RowHeightType of + rhtDefault : h := DefaultRowHeight; + rhtAuto : h := round(CalcRowHeightFromSheet(lRow^.Height) * ZoomFactor); + end; end; end; // case end else