[DE] Fix opening symbol table dialog

This commit is contained in:
Julia Radzhabova 2019-11-15 14:42:07 +03:00
parent f2d2ef5fc3
commit 5aed3e8b51

View file

@ -2475,9 +2475,11 @@ define([
},
onInsertSymbolClick: function() {
if (this.dlgSymbolTable && this.dlgSymbolTable.isVisible()) return;
if (this.api) {
var me = this,
win = new Common.Views.SymbolTableDialog({
var me = this;
me.dlgSymbolTable = new Common.Views.SymbolTableDialog({
api: me.api,
lang: me.mode.lang,
modal: false,
@ -2490,8 +2492,8 @@ define([
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
}
});
win.show();
win.on('symbol:dblclick', function(cmp, settings) {
me.dlgSymbolTable.show();
me.dlgSymbolTable.on('symbol:dblclick', function(cmp, settings) {
me.api.pluginMethod_PasteHtml("<span style=\"font-family:'" + settings.font + "'\">" + settings.symbol + "</span>");
});
}