Browse Source

fixed click would select wrong table

Nicolas Cannasse 6 years ago
parent
commit
6ac9df9e20
1 changed files with 1 additions and 1 deletions
  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;
 				}