Commit 4e941ad2 authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix bug 32895

parent 740ed93f
......@@ -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