Fixed locations menu so items other than first will work.
parent
ffccdcadff
commit
8b7d496eab
|
@ -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++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue