From d72edde7252fe73c6f082a9784aecba724fa1e74 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 29 Aug 2017 12:29:54 +0300 Subject: [PATCH] Fix Bug 35564. --- apps/documenteditor/main/app/view/ImageSettings.js | 3 +++ apps/presentationeditor/main/app/view/ImageSettings.js | 3 +++ apps/spreadsheeteditor/main/app/view/ImageSettings.js | 3 +++ 3 files changed, 9 insertions(+) diff --git a/apps/documenteditor/main/app/view/ImageSettings.js b/apps/documenteditor/main/app/view/ImageSettings.js index 75e6589d7..fe6551062 100644 --- a/apps/documenteditor/main/app/view/ImageSettings.js +++ b/apps/documenteditor/main/app/view/ImageSettings.js @@ -173,8 +173,11 @@ define([ this.btnOriginalSize.on('click', _.bind(this.setOriginalSize, this)); this.btnInsertFromFile.on('click', _.bind(function(btn){ + if (this._isFromFile) return; + this._isFromFile = true; if (this.api) this.api.ChangeImageFromFile(); this.fireEvent('editcomplete', this); + this._isFromFile = false; }, this)); this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this)); this.btnEditObject.on('click', _.bind(function(btn){ diff --git a/apps/presentationeditor/main/app/view/ImageSettings.js b/apps/presentationeditor/main/app/view/ImageSettings.js index d57634338..2919e53b7 100644 --- a/apps/presentationeditor/main/app/view/ImageSettings.js +++ b/apps/presentationeditor/main/app/view/ImageSettings.js @@ -127,8 +127,11 @@ define([ this.btnOriginalSize.on('click', _.bind(this.setOriginalSize, this)); this.btnInsertFromFile.on('click', _.bind(function(btn){ + if (this._isFromFile) return; + this._isFromFile = true; if (this.api) this.api.ChangeImageFromFile(); this.fireEvent('editcomplete', this); + this._isFromFile = false; }, this)); this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this)); this.btnEditObject.on('click', _.bind(function(btn){ diff --git a/apps/spreadsheeteditor/main/app/view/ImageSettings.js b/apps/spreadsheeteditor/main/app/view/ImageSettings.js index 4360b6004..80a86944a 100644 --- a/apps/spreadsheeteditor/main/app/view/ImageSettings.js +++ b/apps/spreadsheeteditor/main/app/view/ImageSettings.js @@ -181,8 +181,11 @@ define([ this.spnHeight.on('change', _.bind(this.onHeightChange, this)); this.btnOriginalSize.on('click', _.bind(this.setOriginalSize, this)); this.btnInsertFromFile.on('click', _.bind(function(btn){ + if (this._isFromFile) return; + this._isFromFile = true; if (this.api) this.api.asc_changeImageFromFile(); Common.NotificationCenter.trigger('edit:complete', this); + this._isFromFile = false; }, this)); this.btnEditObject.on('click', _.bind(function(btn){ if (this.api) this.api.asc_startEditCurrentOleObject();