Merge pull request 'Fix updating status for sheet view' (#822) from fix/update-sheet-view into release/v9.2.0

This commit is contained in:
Julia Radzhabova
2025-11-01 10:16:13 +00:00
3 changed files with 5 additions and 2 deletions

View File

@ -64,7 +64,7 @@ define([
if (api) {
this.api = api;
this.api.asc_registerCallback('asc_onZoomChanged', this.onApiZoomChange.bind(this));
this.api.asc_registerCallback('asc_onSelectionChanged', _.bind(this.onSelectionChanged, this));
this.api.asc_registerCallback('asc_onChangeActiveNamedSheetView', _.bind(this.onChangeActiveNamedSheetView, this));
this.api.asc_registerCallback('asc_onWorksheetLocked', _.bind(this.onWorksheetLocked, this));
this.api.asc_registerCallback('asc_onSheetsChanged', this.onApiSheetChanged.bind(this));
this.api.asc_registerCallback('asc_onUpdateSheetViewSettings', this.onApiSheetChanged.bind(this));
@ -144,7 +144,7 @@ define([
this.SetDisabled(true);
},
onSelectionChanged: function(info) {
onChangeActiveNamedSheetView: function() {
if (!this.toolbar.editMode || !this.view) return;
Common.Utils.lockControls(Common.enumLock.sheetView, this.api.asc_getActiveNamedSheetView && !this.api.asc_getActiveNamedSheetView(this.api.asc_getActiveWorksheetIndex()),

View File

@ -412,6 +412,7 @@ define([
this.api = api;
this.api.asc_registerCallback('asc_onSheetsChanged', _.bind(this.update, this));
this.api.asc_registerCallback('asc_onUpdateSheetViewSettings', _.bind(this.onUpdateSheetViewSettings, this));
this.api.asc_registerCallback('asc_onChangeActiveNamedSheetView', _.bind(this.update, this));
return this;
},

View File

@ -448,6 +448,8 @@ define([
me.btnCreateView.updateHint(me.tipCreate);
me.btnCloseView.updateHint(me.tipClose);
Common.Utils.lockControls(Common.enumLock.sheetView, me.toolbar && me.toolbar.api && me.toolbar.api.asc_getActiveNamedSheetView &&
!me.toolbar.api.asc_getActiveNamedSheetView(me.toolbar.api.asc_getActiveWorksheetIndex()), {array: [me.btnCloseView]});
}
me.btnMacros && me.btnMacros.updateHint(me.tipMacros);
me.btnInterfaceTheme.updateHint(me.tipInterfaceTheme);