Fixed locations menu so items other than first will work.

ver1_5_1
Chris Laurel 2002-09-15 01:31:55 +00:00
parent ffccdcadff
commit 8b7d496eab
1 changed files with 18 additions and 16 deletions

View File

@ -250,8 +250,8 @@ void BuildFavoritesMenu(HMENU menuBar, CelestiaCore* appCore, HINSTANCE appInsta
rootMenuIndex++;
resourceIndex++;
//Now iterate through all Favorites and add items to this folder
//where parentFolder == folderName
// Now iterate through all Favorites and add items
// to this folder where parentFolder == folderName
subMenuIndex = 0;
string folderName = (*iter)->name;
iter++;
@ -279,7 +279,8 @@ void BuildFavoritesMenu(HMENU menuBar, CelestiaCore* appCore, HINSTANCE appInsta
resourceIndex++;
}
//Add a disabled "(empty)" item if no items were added to sub menu
// Add a disabled "(empty)" item if no items
// were added to sub menu
if (subMenuIndex == 0)
{
menuInfo.cbSize = sizeof MENUITEMINFO;
@ -314,6 +315,7 @@ void BuildFavoritesMenu(HMENU menuBar, CelestiaCore* appCore, HINSTANCE appInsta
odMenu->AddItem(locationsMenu, rootMenuIndex);
odMenu->SetItemImage(appInstance, ID_LOCATIONS_FIRSTLOCATION + resourceIndex, IDB_LOCATION);
rootMenuIndex++;
resourceIndex++;
}
iter++;
}