Quellcode durchsuchen

minor cdb shift selection fix

Nicolas Cannasse vor 7 Jahren
Ursprung
Commit
f7feba960d
2 geänderte Dateien mit 5 neuen und 1 gelöschten Zeilen
  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();
 			return;
 		}
+		if( !shift )
+			select = null;
+		else if( select == null )
+			select = { x : x, y : y };
 		if( dx < 0 && (table.displayMode == Table ? x >= 0 : x > 0) )
 			x--;
 		if( dy < 0 && y > 0 )
@@ -58,7 +62,6 @@ class Cursor {
 			x++;
 		if( dy > 0 && y < table.lines.length - 1 )
 			y++;
-		select = null;
 		update();
 	}
 

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

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