diff --git a/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js b/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js index 07fc6fbe3..020fecac1 100644 --- a/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js +++ b/apps/spreadsheeteditor/main/app/view/FormatRulesEditDlg.js @@ -1322,7 +1322,8 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template', if (rec) { props = this._originalProps || new Asc.asc_CConditionalFormattingRule(); - var type = rec.get('type'); + var type = rec.get('type'), + type_changed = (type!==props.asc_getType()); props.asc_setType(type); if (type == Asc.c_oAscCFType.containsText || type == Asc.c_oAscCFType.containsBlanks || type == Asc.c_oAscCFType.duplicateValues || type == Asc.c_oAscCFType.timePeriod || type == Asc.c_oAscCFType.aboveAverage || @@ -1364,7 +1365,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template', props.asc_setValue1(this.txtRange1.getValue()); break; case Asc.c_oAscCFType.colorScale: - var scaleProps = new Asc.asc_CColorScale(); + var scaleProps = !type_changed ? props.asc_getColorScaleOrDataBarOrIconSetRule() : new Asc.asc_CColorScale(); var scalesCount = rec.get('num'); var arr = (scalesCount==2) ? [this.scaleControls[0], this.scaleControls[2]] : this.scaleControls; var colors = [], scales = []; @@ -1381,7 +1382,8 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template', props.asc_setColorScaleOrDataBarOrIconSetRule(scaleProps); break; case Asc.c_oAscCFType.dataBar: - var barProps = new Asc.asc_CDataBar(); + var barProps = !type_changed ? props.asc_getColorScaleOrDataBarOrIconSetRule() : new Asc.asc_CDataBar(); + type_changed && barProps.asc_setInterfaceDefault(); var arr = this.barControls; var bars = []; for (var i=0; i