* Unflag all flagged rows */
| 1988 | * Unflag all flagged rows |
| 1989 | */ |
| 1990 | void CsvApplication::unflagRowsCB() { |
| 1991 | std::string msg; |
| 1992 | int choice; |
| 1993 | int topWinIndex = app.getTopWindow(); |
| 1994 | int countFlaggedRows = windows[topWinIndex].table->countFlaggedRows(); |
| 1995 | if( countFlaggedRows == 0 ) { |
| 1996 | myFlChoice("Info", "There are no flagged rows.", {"Okay"}); |
| 1997 | return; |
| 1998 | } |
| 1999 | msg = "Really unflag " + std::to_string(countFlaggedRows) + " row(s)?"; |
| 2000 | choice = myFlChoice("Confirm", msg, {"Yes", "No"}); |
| 2001 | if( choice == 1 || choice == -1 ) { |
| 2002 | return; |
| 2003 | } |
| 2004 | showImWorkingWindow("Unflagging rows ..."); |
| 2005 | windows[topWinIndex].table->clearFlags(); |
| 2006 | hideImWorkingWindow(); |
| 2007 | windows[topWinIndex].grid->redraw(); |
| 2008 | Fl::check(); |
| 2009 | } |
| 2010 | |
| 2011 | |
| 2012 |
no test coverage detected