[SSE] Don't listen change selection events when modal dialog is visible

This commit is contained in:
Julia Radzhabova 2019-05-28 16:34:57 +03:00
parent 8c463807b0
commit 14bd089146

View file

@ -1665,6 +1665,8 @@ define([
}, },
onApiEditCell: function(state) { onApiEditCell: function(state) {
if (this.getApplication().getController('Main').isModalShowed) return;
var toolbar = this.toolbar; var toolbar = this.toolbar;
if (toolbar.mode.isEditDiagram || toolbar.mode.isEditMailMerge) { if (toolbar.mode.isEditDiagram || toolbar.mode.isEditMailMerge) {
is_cell_edited = (state == Asc.c_oAscCellEditorState.editStart); is_cell_edited = (state == Asc.c_oAscCellEditorState.editStart);
@ -1800,7 +1802,7 @@ define([
}, },
onApiEditorSelectionChanged: function(fontobj) { onApiEditorSelectionChanged: function(fontobj) {
if (!this.editMode) return; if (!this.editMode || this.getApplication().getController('Main').isModalShowed) return;
var toolbar = this.toolbar, var toolbar = this.toolbar,
val; val;
@ -1906,7 +1908,7 @@ define([
}, },
onApiSelectionChanged: function(info) { onApiSelectionChanged: function(info) {
if (!this.editMode) return; if (!this.editMode || this.getApplication().getController('Main').isModalShowed) return;
if ( this.toolbar.mode.isEditDiagram ) if ( this.toolbar.mode.isEditDiagram )
return this.onApiSelectionChanged_DiagramEditor(info); else return this.onApiSelectionChanged_DiagramEditor(info); else
if ( this.toolbar.mode.isEditMailMerge ) if ( this.toolbar.mode.isEditMailMerge )
@ -3322,10 +3324,6 @@ define([
api: me.api, api: me.api,
fontStore: me.fontStore, fontStore: me.fontStore,
handler: function(dlg, result) { handler: function(dlg, result) {
if (result == 'ok') {
var props = dlg.getSettings();
// me.api.asc_editHeader(props);
}
Common.NotificationCenter.trigger('edit:complete'); Common.NotificationCenter.trigger('edit:complete');
} }
}); });