From 92d17aee041fc20a8ab4e8d2f4dd04d5bd73f821 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 29 Jan 2019 15:27:59 +0300 Subject: [PATCH] Bug 40330 --- .../main/app/view/ControlSettingsDialog.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/documenteditor/main/app/view/ControlSettingsDialog.js b/apps/documenteditor/main/app/view/ControlSettingsDialog.js index cc5a69183..16d6f749b 100644 --- a/apps/documenteditor/main/app/view/ControlSettingsDialog.js +++ b/apps/documenteditor/main/app/view/ControlSettingsDialog.js @@ -223,7 +223,7 @@ define([ onColorsSelect: function(picker, color) { this.btnColor.setColor(color); - this._isColorChanged = true; + this._isCanApplyColor = true; }, updateThemeColors: function() { @@ -255,6 +255,7 @@ define([ (val!==null && val!==undefined) && this.cmbShow.setValue(val); val = props.get_Color(); + this._isCanApplyColor = !!val; val = (val) ? Common.Utils.ThemeColor.getHexColor(val.get_r(), val.get_g(), val.get_b()) : 'transparent'; this.btnColor.setColor(val); this.colors.selectByRGB(val,true); @@ -272,7 +273,7 @@ define([ props.put_Tag(this.txtTag.getValue()); props.put_Appearance(this.cmbShow.getValue()); - if (this._isColorChanged) { + if (this._isCanApplyColor) { var color = Common.Utils.ThemeColor.getRgbColor(this.colors.getColor()); props.put_Color(color.get_r(), color.get_g(), color.get_b()); } @@ -308,8 +309,10 @@ define([ if (this.api) { var props = new AscCommon.CContentControlPr(); props.put_Appearance(this.cmbShow.getValue()); - var color = Common.Utils.ThemeColor.getRgbColor(this.colors.getColor()); - props.put_Color(color.get_r(), color.get_g(), color.get_b()); + if (this._isCanApplyColor) { + var color = Common.Utils.ThemeColor.getRgbColor(this.colors.getColor()); + props.put_Color(color.get_r(), color.get_g(), color.get_b()); + } this.api.asc_SetContentControlProperties(props, null, true); } },