[SSE] Fix Bug 43299

This commit is contained in:
Julia Svinareva 2019-10-23 12:43:34 +03:00
parent f0cd1091fe
commit 94389598f7

View file

@ -418,6 +418,7 @@ define([
}, },
onTabMenu: function (o, index, tab, select) { onTabMenu: function (o, index, tab, select) {
var me = this;
if (this.mode.isEdit && !this.isEditFormula && (this.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.Chart) && if (this.mode.isEdit && !this.isEditFormula && (this.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.Chart) &&
(this.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.FormatTable) && (this.rangeSelectionMode !== Asc.c_oAscSelectionDialogType.FormatTable) &&
!this.mode.isDisconnected ) { !this.mode.isDisconnected ) {
@ -428,8 +429,18 @@ define([
if (!tab.isActive()) this.tabbar.setActive(tab); if (!tab.isActive()) this.tabbar.setActive(tab);
var issheetlocked = this.api.asc_isWorksheetLockedOrDeleted(tab.sheetindex), if (!_.isUndefined(select)) {
isdoclocked = this.api.asc_isWorkbookLocked(); var issheetlocked = false;
select.forEach(function (item) {
if (me.api.asc_isWorksheetLockedOrDeleted(item.sheetindex)) {
issheetlocked = true;
}
});
} else {
var issheetlocked = me.api.asc_isWorksheetLockedOrDeleted(tab.sheetindex);
}
var isdoclocked = this.api.asc_isWorkbookLocked();
this.tabMenu.items[0].setDisabled(isdoclocked); this.tabMenu.items[0].setDisabled(isdoclocked);
this.tabMenu.items[1].setDisabled(issheetlocked); this.tabMenu.items[1].setDisabled(issheetlocked);