From 6bcef49afcfd106ff7e930831b2c39989bd27bc0 Mon Sep 17 00:00:00 2001 From: curt Date: Thu, 5 Sep 2002 21:58:24 +0000 Subject: [PATCH] Erik Hofman: It turned out that pui required the submenu structure to be declared backwards, which I didn't notice the first time. --- src/GUI/gui.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/GUI/gui.cxx b/src/GUI/gui.cxx index 7e3ffa875..f0e40a9a4 100644 --- a/src/GUI/gui.cxx +++ b/src/GUI/gui.cxx @@ -116,21 +116,22 @@ void initMenu() SGPropertyNode *call = option[i]->getNode("call"); SGPropertyNode *sep = option[i]->getNode("seperator"); + int pos = option.size()-i-1; if (sep) - Menu[h].submenu[i] = strdup("----------"); + Menu[h].submenu[pos] = strdup("----------"); else if (call && strcmp(call->getStringValue(), "")) - Menu[h].submenu[i] = strdup(name->getStringValue()); + Menu[h].submenu[pos] = strdup(name->getStringValue()); else - Menu[h].submenu[i] = strdup("not specified"); + Menu[h].submenu[pos] = strdup("not specified"); - Menu[h].cb[i] = NULL; + Menu[h].cb[pos] = NULL; for (unsigned int j=0; __fg_gui_fn[j].fn; j++) if (call && !strcmp(call->getStringValue(), __fg_gui_fn[j].name) ) { - Menu[h].cb[i] = __fg_gui_fn[j].fn; + Menu[h].cb[pos] = __fg_gui_fn[j].fn; break; } } -- 2.39.5