fix paste empty

This commit is contained in:
kekee000 2014-12-12 20:00:11 +08:00
parent 00f51639db
commit c27ba8426b

View File

@ -47,7 +47,7 @@ define(
if (ttf) {
$('.main').addClass('editing');
$('.editor').addClass('editing');
program.viewer.setMode('editor');
program.viewer.blur();
@ -105,7 +105,9 @@ define(
program.ttfManager.removeGlyf(e.list);
}).on('paste', function(e) {
var glyfList = clipboard.get('glyf');
program.ttfManager.appendGlyf(glyfList, program.viewer.getSelected());
if (glyfList) {
program.ttfManager.appendGlyf(glyfList, program.viewer.getSelected());
}
})
.on('undo', function(e) {
program.ttfManager.undo();