Commit 2f856637 authored by Alexey Golubev's avatar Alexey Golubev

Merge branch 'hotfix/v4.0.2'

parents 740ed93f 27083f67
[![License](https://img.shields.io/badge/License-GNU%20AGPL%20V3-green.svg?style=flat)](http://www.gnu.org/licenses/agpl-3.0.ru.html) ![Release](https://img.shields.io/badge/Release-v4.0.1-blue.svg?style=flat)
[![License](https://img.shields.io/badge/License-GNU%20AGPL%20V3-green.svg?style=flat)](http://www.gnu.org/licenses/agpl-3.0.ru.html) ![Release](https://img.shields.io/badge/Release-v4.0.2-blue.svg?style=flat)
## Sdkjs
......
......@@ -2476,21 +2476,27 @@
};
WorkbookView.prototype._initCommentsToSave = function() {
var isFirst = true;
for (var wsKey in this.wsViews) {
var wsView = this.wsViews[wsKey];
var wsModel = wsView.model;
wsView.cellCommentator.prepareCommentsToSave();
wsModel.aCommentsCoords = wsView.cellCommentator.aCommentCoords;
if (isFirst) {
isFirst = false;
this.cellCommentator.worksheet = wsView;
this.cellCommentator.overlayCtx = wsView.overlayCtx;
this.cellCommentator.drawingCtx = wsView.drawingCtx;
this.cellCommentator.prepareCommentsToSave();
wsModel.aComments = wsModel.aComments.concat(this.model.aComments);
wsModel.aCommentsCoords = wsModel.aCommentsCoords.concat(this.cellCommentator.aCommentCoords);
var isFirst = true, ws;
// Колличество листов
var countWorksheets = this.model.getWorksheetCount();
for (var i = 0; i < countWorksheets; ++i) {
ws = this.model.getWorksheet(i);
if (ws && 0 < ws.aComments.length) {
var wsView = this.getWorksheet(i);
var wsModel = wsView.model;
wsView.cellCommentator.prepareCommentsToSave();
wsModel.aCommentsCoords = wsView.cellCommentator.aCommentCoords;
if (isFirst) {
isFirst = false;
this.cellCommentator.worksheet = wsView;
this.cellCommentator.overlayCtx = wsView.overlayCtx;
this.cellCommentator.drawingCtx = wsView.drawingCtx;
this.cellCommentator.prepareCommentsToSave();
wsModel.aComments = wsModel.aComments.concat(this.model.aComments);
wsModel.aCommentsCoords = wsModel.aCommentsCoords.concat(this.cellCommentator.aCommentCoords);
}
}
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment