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

Method jumpToFlaggedRow

src/csvapplication.cpp:2759–2776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2757
2758
2759void CsvApplication::jumpToFlaggedRow(bool direction) {
2760 int newRow;
2761 int winIndex = app.getTopWindow();
2762 std::vector<int> sel = windows[winIndex].grid->getSelection();
2763 if( windows[winIndex].table->countFlaggedRows() == 0 ) {
2764 myFlChoice("Information", "No flagged rows found.", {"Okay"});
2765 return;
2766 }
2767 if( direction ) {
2768 newRow = windows[winIndex].table->getNextFlaggedRow(sel[0]);
2769 } else {
2770 newRow = windows[winIndex].table->getPrevFlaggedRow(sel[0]);
2771 }
2772 if( newRow >= 0 && newRow < windows[winIndex].table->getNumberRows() ) {
2773 windows[winIndex].grid->set_selection(newRow,sel[1],newRow,sel[1]);
2774 windows[winIndex].grid->setVisibleArea(newRow, sel[1]);
2775 }
2776}
2777
2778
2779void CsvApplication::switchHeaderRowCB(Fl_Widget *, void *) {

Callers 1

MyMenuCallbackMethod · 0.80

Calls 7

getTopWindowMethod · 0.80
countFlaggedRowsMethod · 0.80
getNextFlaggedRowMethod · 0.80
getPrevFlaggedRowMethod · 0.80
getNumberRowsMethod · 0.80
setVisibleAreaMethod · 0.80
getSelectionMethod · 0.45

Tested by

no test coverage detected