From c40fa6226cab8a652ecedebf76f3a63827bf9b06 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 16 Nov 2021 13:29:22 +0300 Subject: [PATCH] [DE] Fix Bug 52287 --- .../main/app/view/ControlSettingsDialog.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/documenteditor/main/app/view/ControlSettingsDialog.js b/apps/documenteditor/main/app/view/ControlSettingsDialog.js index 10b9d74cc..29662dff5 100644 --- a/apps/documenteditor/main/app/view/ControlSettingsDialog.js +++ b/apps/documenteditor/main/app/view/ControlSettingsDialog.js @@ -555,8 +555,11 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', if (this.btnColor.isAutoColor()) { props.put_Color(null); } else { - var color = Common.Utils.ThemeColor.getRgbColor(this.colors.getColor()); - props.put_Color(color.get_r(), color.get_g(), color.get_b()); + var color = this.colors.getColor() || this.btnColor.color; + if (color) { + color = Common.Utils.ThemeColor.getRgbColor(color); + props.put_Color(color.get_r(), color.get_g(), color.get_b()); + } } var lock = Asc.c_oAscSdtLockType.Unlocked; @@ -665,8 +668,11 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', if (this.btnColor.isAutoColor()) { props.put_Color(null); } else { - var color = Common.Utils.ThemeColor.getRgbColor(this.colors.getColor()); - props.put_Color(color.get_r(), color.get_g(), color.get_b()); + var color = this.colors.getColor() || this.btnColor.color; + if (color) { + color = Common.Utils.ThemeColor.getRgbColor(color); + props.put_Color(color.get_r(), color.get_g(), color.get_b()); + } } this.api.asc_SetContentControlProperties(props, null, true); }