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 ## Sdkjs
......
...@@ -2476,21 +2476,27 @@ ...@@ -2476,21 +2476,27 @@
}; };
WorkbookView.prototype._initCommentsToSave = function() { WorkbookView.prototype._initCommentsToSave = function() {
var isFirst = true; var isFirst = true, ws;
for (var wsKey in this.wsViews) { // Колличество листов
var wsView = this.wsViews[wsKey]; var countWorksheets = this.model.getWorksheetCount();
var wsModel = wsView.model; for (var i = 0; i < countWorksheets; ++i) {
wsView.cellCommentator.prepareCommentsToSave(); ws = this.model.getWorksheet(i);
wsModel.aCommentsCoords = wsView.cellCommentator.aCommentCoords;
if (ws && 0 < ws.aComments.length) {
if (isFirst) { var wsView = this.getWorksheet(i);
isFirst = false; var wsModel = wsView.model;
this.cellCommentator.worksheet = wsView; wsView.cellCommentator.prepareCommentsToSave();
this.cellCommentator.overlayCtx = wsView.overlayCtx; wsModel.aCommentsCoords = wsView.cellCommentator.aCommentCoords;
this.cellCommentator.drawingCtx = wsView.drawingCtx;
this.cellCommentator.prepareCommentsToSave(); if (isFirst) {
wsModel.aComments = wsModel.aComments.concat(this.model.aComments); isFirst = false;
wsModel.aCommentsCoords = wsModel.aCommentsCoords.concat(this.cellCommentator.aCommentCoords); 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