Selaa lähdekoodia

minor cdb shift selection fix

Nicolas Cannasse 7 vuotta sitten
vanhempi
commit
f7feba960d
2 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 4 1
      hide/comp/cdb/Cursor.hx
  2. 1 0
      hide/comp/cdb/Table.hx

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

@@ -50,6 +50,10 @@ class Cursor {
 			update();
 			update();
 			return;
 			return;
 		}
 		}
+		if( !shift )
+			select = null;
+		else if( select == null )
+			select = { x : x, y : y };
 		if( dx < 0 && (table.displayMode == Table ? x >= 0 : x > 0) )
 		if( dx < 0 && (table.displayMode == Table ? x >= 0 : x > 0) )
 			x--;
 			x--;
 		if( dy < 0 && y > 0 )
 		if( dy < 0 && y > 0 )
@@ -58,7 +62,6 @@ class Cursor {
 			x++;
 			x++;
 		if( dy > 0 && y < table.lines.length - 1 )
 		if( dy > 0 && y < table.lines.length - 1 )
 			y++;
 			y++;
-		select = null;
 		update();
 		update();
 	}
 	}
 
 

+ 1 - 0
hide/comp/cdb/Table.hx

@@ -107,6 +107,7 @@ class Table extends Component {
 				switch( c.type ) {
 				switch( c.type ) {
 				case TList, TProperties:
 				case TList, TProperties:
 					cell.element.click(function(e) {
 					cell.element.click(function(e) {
+						if( e.shiftKey ) return;
 						e.stopPropagation();
 						e.stopPropagation();
 						toggleList(cell);
 						toggleList(cell);
 					});
 					});