ソースを参照

Script: fix script checking on changes

trethaller 4 年 前
コミット
b195a42e62
1 ファイル変更5 行追加1 行削除
  1. 5 1
      hide/comp/cdb/ScriptTable.hx

+ 5 - 1
hide/comp/cdb/ScriptTable.hx

@@ -59,7 +59,11 @@ class ScriptTable extends SubTable {
 		]);
 		]);
 		script = new ScriptEditor(cell.value, checker, div);
 		script = new ScriptEditor(cell.value, checker, div);
 		script.onSave = saveValue;
 		script.onSave = saveValue;
-		script.onChanged = saveValue;
+		var onChanged = script.onChanged;
+		script.onChanged = function() {
+			if( onChanged != null ) onChanged();
+			saveValue();
+		}
 		script.propagateKeys = true;
 		script.propagateKeys = true;
 		script.onClose = function() { close(); cell.focus(); }
 		script.onClose = function() { close(); cell.focus(); }
 		lines = [new Line(this,[],0,script.element)];
 		lines = [new Line(this,[],0,script.element)];