Commit b603ac29 authored by Boris Kocherov's avatar Boris Kocherov

fixed double loading of textures

parent 1c9c5b08
...@@ -1111,14 +1111,17 @@ ...@@ -1111,14 +1111,17 @@
this.isSendStandartTextures = true; this.isSendStandartTextures = true;
var _count = AscCommon.g_oUserTexturePresets.length; var _count = AscCommon.g_oUserTexturePresets.length;
var arr = new Array(_count); var arr = new Array(_count),
b_LoadImage = this._editorNameById() === 'cell';
for (var i = 0; i < _count; ++i) for (var i = 0; i < _count; ++i)
{ {
arr[i] = new AscCommon.asc_CTexture(); arr[i] = new AscCommon.asc_CTexture();
arr[i].Id = i; arr[i].Id = i;
arr[i].Image = AscCommon.g_oUserTexturePresets[i]; arr[i].Image = AscCommon.g_oUserTexturePresets[i];
if (b_LoadImage) {
this.ImageLoader.LoadImage(AscCommon.g_oUserTexturePresets[i], 1); this.ImageLoader.LoadImage(AscCommon.g_oUserTexturePresets[i], 1);
} }
}
this.sendEvent('asc_onInitStandartTextures', arr); this.sendEvent('asc_onInitStandartTextures', arr);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment