Commit 42c2a9a3 authored by Alexander.Trofimov's avatar Alexander.Trofimov

Merge branch 'hotfix/v4.0.2' into develop

# Conflicts:
#	Readme.md
#	cell/view/WorkbookView.js
parents 100312b5 27083f67
...@@ -2401,19 +2401,24 @@ ...@@ -2401,19 +2401,24 @@
WorkbookView.prototype._initCommentsToSave = function() { WorkbookView.prototype._initCommentsToSave = function() {
var isFirst = true, wsView, wsModel, tmpWs; var isFirst = true, wsView, wsModel, tmpWs;
for (var wsKey in this.wsViews) { // Колличество листов
wsView = this.wsViews[wsKey]; var countWorksheets = this.model.getWorksheetCount();
wsModel = wsView.model; for (var i = 0; i < countWorksheets; ++i) {
wsModel.aCommentsCoords = wsView.cellCommentator.getCoordsToSave(); tmpWs = this.model.getWorksheet(i);
if (tmpWs && 0 < tmpWs.aComments.length) {
if (isFirst) { wsView = this.getWorksheet(i);
isFirst = false; wsModel = wsView.model;
tmpWs = this.cellCommentator.worksheet; wsModel.aCommentsCoords = wsView.cellCommentator.getCoordsToSave();
this.cellCommentator.worksheet = wsView;
this.cellCommentator.overlayCtx = wsView.overlayCtx; if (isFirst) {
this.cellCommentator.drawingCtx = wsView.drawingCtx; isFirst = false;
this.model.aCommentsCoords = this.cellCommentator.getCoordsToSave(); tmpWs = this.cellCommentator.worksheet;
this.cellCommentator.worksheet = tmpWs; this.cellCommentator.worksheet = wsView;
this.cellCommentator.overlayCtx = wsView.overlayCtx;
this.cellCommentator.drawingCtx = wsView.drawingCtx;
this.model.aCommentsCoords = this.cellCommentator.getCoordsToSave();
this.cellCommentator.worksheet = tmpWs;
}
} }
} }
}; };
......
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