[SSE] Fix Bug 46338

This commit is contained in:
Julia Radzhabova 2020-09-08 15:48:05 +03:00
parent d9c5b29953
commit a298d8f28b
2 changed files with 14 additions and 6 deletions

View file

@ -111,10 +111,12 @@ define([
if (settings.api) {
me.api = settings.api;
me.wrapEvents = {
onApiRangeChanged: _.bind(me.onApiRangeChanged, me)
};
me.api.asc_setSelectionDialogMode(settings.type, settings.range ? settings.range : '');
me.api.asc_unregisterCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
me.api.asc_registerCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
me.api.asc_registerCallback('asc_onSelectionRangeChanged', me.wrapEvents.onApiRangeChanged);
Common.NotificationCenter.trigger('cells:range', settings.type);
}
@ -177,8 +179,10 @@ define([
},
onClose: function(event) {
if (this.api)
if (this.api) {
this.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.None);
this.api.asc_unregisterCallback('asc_onSelectionRangeChanged', this.wrapEvents.onApiRangeChanged);
}
Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.None);
SSE.getController('RightMenu').SetDisabled(false);

View file

@ -133,8 +133,10 @@ define([
if (settings.selectionType)
me.selectionType = settings.selectionType;
me.api.asc_unregisterCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
me.api.asc_registerCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
me.wrapEvents = {
onApiRangeChanged: _.bind(me.onApiRangeChanged, me)
};
me.api.asc_registerCallback('asc_onSelectionRangeChanged', me.wrapEvents.onApiRangeChanged);
Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.FormatTable);
}
@ -190,8 +192,10 @@ define([
},
onClose: function(event) {
if (this.api)
if (this.api) {
this.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.None);
this.api.asc_unregisterCallback('asc_onSelectionRangeChanged', this.wrapEvents.onApiRangeChanged);
}
Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.None);
Common.NotificationCenter.trigger('edit:complete', this);