From cab5b6adcabe6425784cf9dace5f5d428c3d4f13 Mon Sep 17 00:00:00 2001 From: YouWei Zhao Date: Fri, 26 Oct 2018 23:27:42 +0800 Subject: [PATCH] fix-editor-init-tileset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 避免在一个actionlist中定义两次,使第一次的修改无效 --- _server/editor_file.js | 1 + 1 file changed, 1 insertion(+) diff --git a/_server/editor_file.js b/_server/editor_file.js index ffc764a1..71d03d5d 100644 --- a/_server/editor_file.js +++ b/_server/editor_file.js @@ -482,6 +482,7 @@ editor_file = function (editor, callback) { // 是tilesets 且未定义 且在这里是第一次定义 if(idnum>=editor.core.icons.tilesetStartOffset && !isset(editor.core.maps.blocksInfo[idnum]) && tempmap.indexOf(idnum)===-1){ actionList.splice(ii,0,["add","['" + idnum + "']",{"cls": "tileset", "id": "X"+idnum, "noPass": true}]); + tempmap.push(idnum); ii++; } value[1] = "['" + idnum + "']" + value[1];