MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / moveSelection

Method moveSelection

src/csvgrid.cpp:519–532  ·  view source on GitHub ↗

* Move selection by the given rows and cols */

Source from the content-addressed store, hash-verified

517 * Move selection by the given rows and cols
518 */
519void CsvGrid::moveSelection(int rows, int cols) {
520 DEBUG_PRINTF("#### CsvGrid::moveSelection: %d, %d\n", rows, cols);
521 int row_top, col_left, row_bot, col_right;
522 get_selection(row_top, col_left, row_bot, col_right);
523 row_top += rows;
524 row_bot += rows;
525 col_left += cols;
526 col_right += cols;
527 if( row_top < 0 )
528 row_top = 0;
529 if( col_left < 0 )
530 col_left = 0;
531 set_selection(row_top, col_left, row_bot, col_right);
532}
533
534
535

Callers 4

moveColsMethod · 0.80
addColMethod · 0.80
addRowMethod · 0.80
switchHeaderRowCBMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected