[SSE] Fix font name.

Fix for rev. ab48174165 [ab48174]
11 ноября 2020 г. 15:32:19
Improve performance
This commit is contained in:
Julia Radzhabova 2021-01-23 16:40:40 +03:00
parent d6eb9c1c7c
commit 6014823eb3
2 changed files with 5 additions and 11 deletions

View file

@ -345,10 +345,9 @@ define([
var me = this;
var name = (_.isFunction(font.get_Name) ? font.get_Name() : font.asc_getFontName());
if (this.__name !== name) {
this.__name = name;
if (!this.__nameId) {
this.__nameId = setTimeout(function () {
me.onApiChangeFontInternal(me.__name);
me.onApiChangeFontInternal(name);
me.__nameId = null;
}, 100);
}
@ -358,6 +357,7 @@ define([
onApiChangeFontInternal: function(name) {
if (this.inFormControl) return;
this.__name = name;
if (this.getRawValue() !== name) {
var record = this.store.findWhere({
name: name

View file

@ -2038,10 +2038,7 @@ define([
val;
/* read font name */
var fontparam = fontobj.asc_getFontName();
if (fontparam != toolbar.cmbFontName.getValue()) {
Common.NotificationCenter.trigger('fonts:change', fontobj);
}
/* read font params */
if (!toolbar.mode.isEditMailMerge && !toolbar.mode.isEditDiagram) {
@ -2153,10 +2150,7 @@ define([
val, need_disable = false;
/* read font name */
var fontparam = xfs.asc_getFontName();
if (fontparam != toolbar.cmbFontName.getValue()) {
Common.NotificationCenter.trigger('fonts:change', xfs);
}
/* read font size */
var str_size = xfs.asc_getFontSize();
@ -2335,7 +2329,7 @@ define([
formatTableInfo = info.asc_getFormatTableInfo();
if (!toolbar.mode.isEditMailMerge) {
/* read cell horizontal align */
fontparam = xfs.asc_getHorAlign();
var fontparam = xfs.asc_getHorAlign();
if (this._state.pralign !== fontparam) {
this._state.pralign = fontparam;