diff --git a/graphicswin.cpp b/graphicswin.cpp index f8279fd5..0b1131c2 100644 --- a/graphicswin.cpp +++ b/graphicswin.cpp @@ -531,8 +531,8 @@ void GraphicsWindow::EnsureValidActives(void) { // And update the checked state for various menus bool locked = LockedInWorkplane(); - CheckMenuById(MNU_FREE_IN_3D, !locked); - CheckMenuById(MNU_SEL_WORKPLANE, locked); + RadioMenuById(MNU_FREE_IN_3D, !locked); + RadioMenuById(MNU_SEL_WORKPLANE, locked); SS.UndoEnableMenus(); @@ -544,8 +544,8 @@ void GraphicsWindow::EnsureValidActives(void) { SS.viewUnits = SolveSpace::UNIT_MM; break; } - CheckMenuById(MNU_UNITS_MM, SS.viewUnits == SolveSpace::UNIT_MM); - CheckMenuById(MNU_UNITS_INCHES, SS.viewUnits == SolveSpace::UNIT_INCHES); + RadioMenuById(MNU_UNITS_MM, SS.viewUnits == SolveSpace::UNIT_MM); + RadioMenuById(MNU_UNITS_INCHES, SS.viewUnits == SolveSpace::UNIT_INCHES); ShowTextWindow(SS.GW.showTextWindow); CheckMenuById(MNU_SHOW_TEXT_WND, SS.GW.showTextWindow); diff --git a/solvespace.h b/solvespace.h index a5437fea..9a5c4633 100644 --- a/solvespace.h +++ b/solvespace.h @@ -128,7 +128,8 @@ void LoadAllFontFiles(void); void OpenWebsite(const char *url); void CheckMenuById(int id, BOOL checked); -void EnableMenuById(int id, BOOL checked); +void RadioMenuById(int id, BOOL selected); +void EnableMenuById(int id, BOOL enabled); void ShowGraphicsEditControl(int x, int y, char *s); void HideGraphicsEditControl(void); diff --git a/win32/w32main.cpp b/win32/w32main.cpp index 471b1207..07293444 100644 --- a/win32/w32main.cpp +++ b/win32/w32main.cpp @@ -936,6 +936,11 @@ void CheckMenuById(int id, BOOL checked) { MenuById(id, checked, TRUE); } +void RadioMenuById(int id, BOOL selected) +{ + // Windows does not natively support radio-button menu items + MenuById(id, selected, TRUE); +} void EnableMenuById(int id, BOOL enabled) { MenuById(id, enabled, FALSE);