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

Method deleteSelection

src/csvgrid.cpp:477–498  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

475
476
477void CsvGrid::deleteSelection() {
478 DEBUG_PRINTF("#### CsvGrid::deleteSelection\n");
479 int myrow, mycol;
480 int s_left, s_top, s_right, s_bottom;
481
482 get_selection(s_top, s_left, s_bottom, s_right);
483
484 if( s_top == s_bottom && s_left == s_right) {
485 windows[app.getTopWindow()].addUndoStateCell(dataTable->getCell(s_top,s_left), s_top, s_left, "Delete Selection");
486 } else {
487 windows[app.getTopWindow()].addUndoStateTable("Delete Selection");
488 }
489 windows[app.getTopWindow()].setUsed(true);
490 windows[app.getTopWindow()].setChanged(true);
491
492 for(myrow = s_top; myrow <= s_bottom; myrow++) {
493 for(mycol = s_left; mycol <= s_right; mycol++) {
494 dataTable->setCell("", myrow, mycol);
495 }
496 }
497 this->redraw();
498}
499
500
501void CsvGrid::selectAll() {

Callers

nothing calls this directly

Calls 7

addUndoStateCellMethod · 0.80
getTopWindowMethod · 0.80
getCellMethod · 0.80
addUndoStateTableMethod · 0.80
setUsedMethod · 0.80
setChangedMethod · 0.80
setCellMethod · 0.80

Tested by

no test coverage detected