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

Method setTopWindow

src/csvapplication.cpp:844–857  ·  view source on GitHub ↗

* Sets the new topWindow or the first slot it encounters. * (Hint: topWindow can get -1 if all slots are not used – should not occur) */

Source from the content-addressed store, hash-verified

842 * (Hint: topWindow can get -1 if all slots are not used – should not occur)
843 */
844void 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
860int CsvApplication::getTopWindow() {

Callers 1

csvwindow.cppFile · 0.80

Calls 2

getWindowSlotUsedMethod · 0.80
hasUndoStatesMethod · 0.80

Tested by

no test coverage detected