Browse Source

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

lviguier 6 tháng trước cách đây
mục cha
commit
fc04e02bd6
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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);