don't destroy iterated map entries; delete _menubar; restore closed
non-nasal dialogs
This commit is contained in:
parent
4cc3beff42
commit
c6a1ba7f97
1 changed files with 8 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue