Add a hack to keep OSX from hijacking our help menu.
For some reason once a player is opened from the Kicad Manager window all the items under the help menu get grayed out. This prevents that from happening.
This commit is contained in:
parent
f9417c6584
commit
0321e55f0b
|
@ -452,7 +452,8 @@ void EDA_BASE_FRAME::AddStandardHelpMenu( wxMenuBar* aMenuBar )
|
|||
helpMenu->AppendSeparator();
|
||||
helpMenu->Add( _( "&About KiCad" ), "", wxID_ABOUT, BITMAPS::about );
|
||||
|
||||
aMenuBar->Append( helpMenu, _( "&Help" ) );
|
||||
// Trailing space keeps OSX from hijacking our menu (and disabling everything in it).
|
||||
aMenuBar->Append( helpMenu, _( "&Help" ) + wxS( " " ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -252,20 +252,13 @@ void ACTION_MENU::Clear()
|
|||
|
||||
bool ACTION_MENU::HasEnabledItems() const
|
||||
{
|
||||
bool hasEnabled = false;
|
||||
|
||||
auto& items = GetMenuItems();
|
||||
|
||||
for( auto item : items )
|
||||
for( wxMenuItem* item : GetMenuItems() )
|
||||
{
|
||||
if( item->IsEnabled() && !item->IsSeparator() )
|
||||
{
|
||||
hasEnabled = true;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return hasEnabled;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -339,7 +332,7 @@ void ACTION_MENU::updateHotKeys()
|
|||
{
|
||||
TOOL_MANAGER* toolMgr = getToolManager();
|
||||
|
||||
for( auto& ii : m_toolActions )
|
||||
for( std::pair<const int, const TOOL_ACTION*>& ii : m_toolActions )
|
||||
{
|
||||
int id = ii.first;
|
||||
const TOOL_ACTION& action = *ii.second;
|
||||
|
|
Loading…
Reference in New Issue