1
0
Fork 0

don't destroy iterated map entries; delete _menubar; restore closed

non-nasal dialogs
This commit is contained in:
mfranz 2005-11-08 18:18:55 +00:00
parent 4cc3beff42
commit c6a1ba7f97

View file

@ -55,21 +55,24 @@ NewGUI::reinit ()
map<string,FGDialog *>::iterator iter; map<string,FGDialog *>::iterator iter;
vector<string> dlg; vector<string> dlg;
// close all open dialogs and remember them ... // close all open dialogs and remember them ...
for (iter = _active_dialogs.begin(); iter != _active_dialogs.end(); iter++) { for (iter = _active_dialogs.begin(); iter != _active_dialogs.end(); ++iter)
dlg.push_back(iter->first); dlg.push_back(iter->first);
closeDialog(iter->first);
} unsigned int i;
for (i = 0; i < dlg.size(); i++)
closeDialog(dlg[i]);
unbind(); unbind();
clear(); clear();
setStyle(); setStyle();
delete _menubar;
_menubar = new FGMenuBar; _menubar = new FGMenuBar;
init(); init();
bind(); bind();
// open remembered dialogs again (no nasal generated ones, unfortunately) // open remembered dialogs again (no nasal generated ones, unfortunately)
// for (unsigned int i = 0; i < dlg.size(); i++) for (i = 0; i < dlg.size(); i++)
// showDialog(dlg[i]); showDialog(dlg[i]);
} }
void void