Skip to content

Commit

Permalink
[se] Fix bug 72879
Browse files Browse the repository at this point in the history
  • Loading branch information
GoshaZotov committed Jan 28, 2025
1 parent 5419730 commit fc14bbe
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions cell/model/UndoRedo.js
Original file line number Diff line number Diff line change
Expand Up @@ -3434,9 +3434,11 @@ function (window, undefined) {
oLockInfo["rangeOrObjectId"] = new Asc.Range(nCol, nRow, nCol, nRow);
wb.aCollaborativeChangeElements.push(oLockInfo);
}

let oValue, oStyle;
if (bUndo) {
var oValue = Data.oOldVal.value;
var oStyle = Data.oOldVal.style;
oValue = Data.oOldVal.value;
oStyle = Data.oOldVal.style;
ws._getCell(nRow, nCol, function (cell) {
cell.setValueData(oValue);
if (null != oStyle) {
Expand All @@ -3447,7 +3449,20 @@ function (window, undefined) {
});

} else {
ws._removeCell(nRow, nCol);
if (Data.oNewVal) {
oValue = Data.oNewVal.value;
oStyle = Data.oNewVal.style;
ws._getCell(nRow, nCol, function (cell) {
cell.setValueData(oValue);
if (null != oStyle) {
cell.setStyle(oStyle);
} else {
cell.setStyle(null);
}
});
} else {
ws._removeCell(nRow, nCol);
}
}
} else if (AscCH.historyitem_Worksheet_ColProp === Type) {
index = Data.index;
Expand Down

0 comments on commit fc14bbe

Please sign in to comment.