From e2df5a8ab0605f5d32de406a54854faee4f15490 Mon Sep 17 00:00:00 2001 From: Svetlana Kulikova Date: Thu, 6 Feb 2025 11:58:24 +0300 Subject: [PATCH] Fix C&IC FreeText --- .../graphics/pro/js/wasm/js/drawingfile.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/DesktopEditor/graphics/pro/js/wasm/js/drawingfile.js b/DesktopEditor/graphics/pro/js/wasm/js/drawingfile.js index a5f8645d11..bece983daf 100644 --- a/DesktopEditor/graphics/pro/js/wasm/js/drawingfile.js +++ b/DesktopEditor/graphics/pro/js/wasm/js/drawingfile.js @@ -747,7 +747,7 @@ function readAnnotType(reader, rec, readDoubleFunc, readDouble2Func, readStringF else if (rec["Type"] == 2) { // Background color - C->IC - if (rec["C"]) + if (!isRead && rec["C"]) { rec["IC"] = rec["C"]; delete rec["C"]; @@ -785,9 +785,18 @@ function readAnnotType(reader, rec, readDoubleFunc, readDouble2Func, readStringF if (flags & (1 << 21)) { let n = reader.readInt(); - rec["C"] = []; - for (let i = 0; i < n; ++i) - rec["C"].push(readDouble2Func.call(reader)); + if (isRead) + { + rec["IC"] = []; + for (let i = 0; i < n; ++i) + rec["IC"].push(readDouble2Func.call(reader)); + } + else + { + rec["C"] = []; + for (let i = 0; i < n; ++i) + rec["C"].push(readDouble2Func.call(reader)); + } } } // Caret