* Sets the new topWindow or the first slot it encounters. * (Hint: topWindow can get -1 if all slots are not used – should not occur) */
| 842 | * (Hint: topWindow can get -1 if all slots are not used – should not occur) |
| 843 | */ |
| 844 | void CsvApplication::setTopWindow(int topWindow) { |
| 845 | if( topWindow == -1 ) { |
| 846 | for( int slot = 0; slot < TCRUNCHER_MAX_WINDOWS; ++slot ) { |
| 847 | if( windows[slot].getWindowSlotUsed() ) { |
| 848 | topWindow = slot; |
| 849 | break; |
| 850 | } |
| 851 | } |
| 852 | } |
| 853 | if( topWindow >= 0) { |
| 854 | this->topWindow = topWindow; |
| 855 | setUndoMenuItem( windows[topWindow].hasUndoStates() ); |
| 856 | } |
| 857 | } |
| 858 | |
| 859 | |
| 860 | int CsvApplication::getTopWindow() { |
no test coverage detected