Changeset 2a037d492016…
Parent 5777e0448d56…
by
Changes to one file · Browse files at 2a037d492016 Showing diff from parent 5777e0448d56 Diff from another changeset...
@@ -342,15 +342,25 @@ if (hSubMenu)
{
UINT indexSubMenu = 0;
+ bool isSeparator = true ;
for( walk = entries ; *walk != EndOfList ; walk++ )
{
- if( *walk == Separator )
- InsertMenu(hSubMenu, indexSubMenu++, MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
+ if( *walk == Separator)
+ {
+ if (!isSeparator)
+ {
+ InsertMenu(hSubMenu, indexSubMenu++, MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
+ isSeparator = true ;
+ }
+ }
else
{
UINT idx = (UINT) *walk;
if( !promoted[idx] )
+ {
InsertMenuItemByName(hSubMenu, menuDescList[idx].name, indexSubMenu++, idCmd++, idCmdFirst, "");
+ isSeparator = false ;
+ }
}
}
}
|
Loading...