diff --git a/graphicswin.cpp b/graphicswin.cpp index 0b1131c..ab233b3 100644 --- a/graphicswin.cpp +++ b/graphicswin.cpp @@ -22,7 +22,7 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = { { 0, "&File", 0, 0, NULL }, { 1, "&New\tCtrl+N", MNU_NEW, 'N'|C, mFile }, { 1, "&Open...\tCtrl+O", MNU_OPEN, 'O'|C, mFile }, -{10, "Open &Recent", MNU_OPEN_RECENT, 0, mFile }, +{ 1, "Open &Recent", MNU_OPEN_RECENT, 0, mFile }, { 1, "&Save\tCtrl+S", MNU_SAVE, 'S'|C, mFile }, { 1, "Save &As...", MNU_SAVE_AS, 0, mFile }, { 1, NULL, 0, 0, NULL }, @@ -83,7 +83,7 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = { { 1, "&Lathe\tShift+L", MNU_GROUP_LATHE, 'L'|S, mGrp }, { 1, NULL, 0, 0, NULL }, { 1, "Import / Assemble...\tShift+I", MNU_GROUP_IMPORT, 'I'|S, mGrp }, -{11, "Import Recent", MNU_GROUP_RECENT, 0, mGrp }, +{ 1, "Import Recent", MNU_GROUP_RECENT, 0, mGrp }, { 0, "&Sketch", 0, 0, NULL }, { 1, "In &Workplane\t2", MNU_SEL_WORKPLANE, '2', mReq }, diff --git a/win32/w32main.cpp b/win32/w32main.cpp index b64c10a..72918ee 100644 --- a/win32/w32main.cpp +++ b/win32/w32main.cpp @@ -983,19 +983,19 @@ HMENU CreateGraphicsWindowMenus(void) SubMenus[subMenu] = m; subMenu++; } else if(SS.GW.menu[i].level == 1) { - if(SS.GW.menu[i].label) { + if(SS.GW.menu[i].id == GraphicsWindow::MNU_OPEN_RECENT) { + RecentOpenMenu = CreateMenu(); + AppendMenu(m, MF_STRING | MF_POPUP, + (UINT_PTR)RecentOpenMenu, SS.GW.menu[i].label); + } else if(SS.GW.menu[i].id == GraphicsWindow::MNU_GROUP_RECENT) { + RecentImportMenu = CreateMenu(); + AppendMenu(m, MF_STRING | MF_POPUP, + (UINT_PTR)RecentImportMenu, SS.GW.menu[i].label); + } else if(SS.GW.menu[i].label) { AppendMenu(m, MF_STRING, SS.GW.menu[i].id, SS.GW.menu[i].label); } else { AppendMenu(m, MF_SEPARATOR, SS.GW.menu[i].id, ""); } - } else if(SS.GW.menu[i].level == 10) { - RecentOpenMenu = CreateMenu(); - AppendMenu(m, MF_STRING | MF_POPUP, - (UINT_PTR)RecentOpenMenu, SS.GW.menu[i].label); - } else if(SS.GW.menu[i].level == 11) { - RecentImportMenu = CreateMenu(); - AppendMenu(m, MF_STRING | MF_POPUP, - (UINT_PTR)RecentImportMenu, SS.GW.menu[i].label); } else oops(); } RefreshRecentMenus();