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

Method addRow

src/csvapplication.cpp:2463–2482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2461
2462
2463void CsvApplication::addRow(bool before) {
2464 int row_top, row_bottom, col_top, col_bottom;
2465 int winIndex = app.getTopWindow();
2466 windows[winIndex].grid->get_selection(row_top, col_top, row_bottom, col_bottom);
2467 showImWorkingWindow("Adding row ...");
2468 windows[winIndex].addUndoStateTable("Add row");
2469 windows[winIndex].setChanged(true);
2470 windows[winIndex].setUsed(true);
2471 if( before ) {
2472 windows[winIndex].table->addRow(row_top, true);
2473 windows[winIndex].grid->moveSelection(1,0);
2474 } else {
2475 windows[winIndex].table->addRow(row_bottom, false);
2476 }
2477 hideImWorkingWindow();
2478 windows[winIndex].grid->rows( windows[winIndex].table->getNumberRows() );
2479 windows[winIndex].grid->cols( windows[winIndex].table->getNumberCols() );
2480 windows[winIndex].grid->redraw();
2481 Fl::check();
2482}
2483
2484
2485void CsvApplication::delCols() {

Callers 2

addRowAboveCBMethod · 0.45
addRowCBMethod · 0.45

Calls 9

checkFunction · 0.85
getTopWindowMethod · 0.80
addUndoStateTableMethod · 0.80
setChangedMethod · 0.80
setUsedMethod · 0.80
moveSelectionMethod · 0.80
rowsMethod · 0.80
getNumberRowsMethod · 0.80
getNumberColsMethod · 0.80

Tested by

no test coverage detected