From 25878c44d6946d19571b22f65e3293f58947f79b Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Fri, 22 Apr 2022 21:42:02 +0000 Subject: [PATCH] fpspreadsheet: Disable workbook notifications while moving cells. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8261 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/source/common/fpspreadsheet.pas | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/fpspreadsheet/source/common/fpspreadsheet.pas b/components/fpspreadsheet/source/common/fpspreadsheet.pas index 5812b434f..3bfda6d4e 100644 --- a/components/fpspreadsheet/source/common/fpspreadsheet.pas +++ b/components/fpspreadsheet/source/common/fpspreadsheet.pas @@ -2280,6 +2280,10 @@ begin if ACell = nil then exit; + // Avoid misplaced notifications during the copy operations when things could + // not yet be in place. + FWorkbook.DisableNotifications; + // Store old location fromRow := ACell^.Row; fromCol := ACell^.Col; @@ -2296,6 +2300,8 @@ begin // Delete cell at old location DeleteCell(ACell); + FWorkbook.EnableNotifications; + // Notify visual controls of changes ChangedCell(AToRow, AToCol);