瀏覽代碼

Fix moveBack after F12

Leonardo Jeanteur 2 天之前
父節點
當前提交
48c455d042
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      hide/comp/cdb/Editor.hx

+ 3 - 2
hide/comp/cdb/Editor.hx

@@ -190,7 +190,8 @@ class Editor extends Component {
 		keys.register("cdb.globalSeekIds", () -> new GlobalSeek(cdbTable.element, cdbTable, GlobalIds, currentSheet));
 
 		base = sheet.base;
-		cursor = new Cursor(this);
+		if( cursor == null )
+			cursor = new Cursor(this);
 
 		if( displayMode == null ) displayMode = Table;
 		DataFiles.load();
@@ -563,7 +564,7 @@ class Editor extends Component {
 	}
 
 	function onCopy() {
-		if( cursor.selection == null )
+		if( cursor.selection == null || cursor.table == null )
 			return;
 
 		function saveValue(out: Dynamic, obj: Dynamic, c: cdb.Data.Column) {