| 2417 | |
| 2418 | |
| 2419 | void CsvApplication::moveCols(bool right) { |
| 2420 | int row_top, row_bottom, col_top, col_bottom; |
| 2421 | int winIndex = app.getTopWindow(); |
| 2422 | windows[winIndex].grid->get_selection(row_top, col_top, row_bottom, col_bottom); |
| 2423 | if( (right && col_bottom < windows[winIndex].table->getNumberCols() - 1 && col_top >= 0) || |
| 2424 | (!right && col_bottom < windows[winIndex].table->getNumberCols() && col_top > 0 ) ) { |
| 2425 | showImWorkingWindow("Moving column(s) ..."); |
| 2426 | windows[winIndex].addUndoStateTable("Move column(s)"); |
| 2427 | windows[winIndex].setChanged(true); |
| 2428 | windows[winIndex].setUsed(true); |
| 2429 | windows[winIndex].table->moveCols(col_top, col_bottom, right); |
| 2430 | if( right ) |
| 2431 | windows[winIndex].grid->moveSelection(0,1); |
| 2432 | else |
| 2433 | windows[winIndex].grid->moveSelection(0,-1); |
| 2434 | hideImWorkingWindow(); |
| 2435 | windows[winIndex].grid->redraw(); |
| 2436 | Fl::check(); |
| 2437 | } |
| 2438 | } |
| 2439 | |
| 2440 | |
| 2441 | void CsvApplication::addCol(bool before) { |
nothing calls this directly
no test coverage detected