Make sure Help menu is at end of menubar.

This commit is contained in:
Jeff Young 2023-06-26 13:43:48 +01:00
parent 7e8070b700
commit 1b7473c353
2 changed files with 19 additions and 0 deletions

View File

@ -499,6 +499,22 @@ void EDA_BASE_FRAME::ReCreateMenuBar()
}
void EDA_BASE_FRAME::SetMenuBar( wxMenuBar* menu_bar )
{
wxFrame::SetMenuBar( menu_bar );
// Move Help menu back to end of menubar
int pos = GetMenuBar()->FindMenu( _( "&Help" ) + wxS( " " ) );
if( pos != wxNOT_FOUND )
{
wxMenu* helpMenu = GetMenuBar()->Remove( pos );
GetMenuBar()->Append( helpMenu, _( "&Help" ) + wxS( " " ) );
}
}
void EDA_BASE_FRAME::AddStandardHelpMenu( wxMenuBar* aMenuBar )
{
COMMON_CONTROL* commonControl = m_toolManager->GetTool<COMMON_CONTROL>();
@ -516,6 +532,7 @@ void EDA_BASE_FRAME::AddStandardHelpMenu( wxMenuBar* aMenuBar )
// Trailing space keeps OSX from hijacking our menu (and disabling everything in it).
aMenuBar->Append( helpMenu, _( "&Help" ) + wxS( " " ) );
helpMenu->wxMenu::SetTitle( _( "&Help" ) + wxS( " " ) );
}

View File

@ -439,6 +439,8 @@ public:
*/
void ReCreateMenuBar();
void SetMenuBar( wxMenuBar *menu_bar ) override;
/**
* Adds the standard KiCad help menu to the menubar.
*/