Fix Bug 49762 (Revert rev. 6014823eb3)

This commit is contained in:
Julia Radzhabova 2021-04-20 15:29:32 +03:00
parent 3b819e33e8
commit 5b2ab0ca0e

View file

@ -356,19 +356,20 @@ 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(name); me.onApiChangeFontInternal(me.__name);
me.__nameId = null; me.__nameId = null;
}, 100); }, 100);
} }
} }
}, },
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