浏览代码

fixed click would select wrong table

Nicolas Cannasse 6 年之前
父节点
当前提交
6ac9df9e20
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      hide/comp/cdb/Cursor.hx

+ 1 - 1
hide/comp/cdb/Cursor.hx

@@ -17,7 +17,7 @@ class Cursor {
 	public function set( ?t:Table, ?x=0, ?y=0, ?sel, update = true ) {
 		if( t != null ) {
 			for( t2 in editor.tables )
-				if( t.sheet.name == t2.sheet.name ) {
+				if( t.sheet.name == t2.sheet.name && (t.sheet.parent == null || t.sheet.parent.line == t2.sheet.parent.line) ) {
 					t = t2;
 					break;
 				}