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

View file

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