浏览代码

CDB: fix cursor error when selecting line in different previous selection table

lviguier 6 月之前
父节点
当前提交
fc04e02bd6
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      hide/comp/cdb/Cursor.hx

+ 2 - 0
hide/comp/cdb/Cursor.hx

@@ -367,11 +367,13 @@ class Cursor {
 
 
 	public function clickLine( line : Line, shiftKey = false, ctrlKey = false ) {
+		this.table = line.table;
 		addElementToSelection(line.table, line, -1, line.index, shiftKey, ctrlKey);
 		set(line.table, -1, line.index, this.selection);
 	}
 
 	public function clickCell( cell : Cell, shiftKey = false, ctrlKey = false ) {
+		this.table = cell.table;
 		var xIndex = cell.table.displayMode == Table ? cell.columnIndex : 0;
 		addElementToSelection(cell.table, cell.line, xIndex, cell.line.index, shiftKey, ctrlKey);
 		set(cell.table, xIndex, cell.line.index, this.selection);