From 1854345961fbc0e41a697084689648eb5b1b1f12 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 17 Jul 2020 18:38:38 +0300 Subject: [PATCH] [SSE] Fix sheet view mode tip --- .../main/app/controller/Statusbar.js | 50 +++++++++++-------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js index 62462da3d..02aca59c4 100644 --- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js @@ -104,7 +104,6 @@ define([ this.api.asc_registerCallback('asc_onError', _.bind(this.onError, this)); this.api.asc_registerCallback('asc_onFilterInfo', _.bind(this.onApiFilterInfo , this)); this.api.asc_registerCallback('asc_onActiveSheetChanged', _.bind(this.onApiActiveSheetChanged, this)); - this.api.asc_registerCallback('asc_onActiveSheetChanged', _.bind(this.onApiActiveSheetChanged, this)); this.api.asc_registerCallback('asc_onRefreshNamedSheetViewList', _.bind(this.onRefreshNamedSheetViewList, this)); this.statusbar.setApi(api); @@ -710,12 +709,16 @@ define([ onApiActiveSheetChanged: function (index) { this.statusbar.tabMenu.hide(); + if (this._sheetViewTip && this._sheetViewTip.isVisible() && !this.api.asc_getActiveNamedSheetView(index)) { // hide tip when sheet in the default mode + this._sheetViewTip.hide(); + } }, onRefreshNamedSheetViewList: function() { var views = this.api.asc_getNamedSheetViews(), active = false, - name=""; + name="", + me = this; for (var i=0; i