Add flip board view to footprint editor menu.

Fixes https://gitlab.com/kicad/code/kicad/issues/7484
This commit is contained in:
Jeff Young 2021-02-10 21:53:55 +00:00
parent 286a364ad4
commit 05ff0fb658
2 changed files with 9 additions and 0 deletions

View File

@ -1020,6 +1020,12 @@ void FOOTPRINT_EDIT_FRAME::setupUIConditions()
return GetDisplayOptions().m_ContrastModeDisplay != HIGH_CONTRAST_MODE::NORMAL; return GetDisplayOptions().m_ContrastModeDisplay != HIGH_CONTRAST_MODE::NORMAL;
}; };
auto boardFlippedCond =
[this]( const SELECTION& )
{
return GetCanvas()->GetView()->IsMirroredX();
};
auto footprintTreeCond = auto footprintTreeCond =
[this] (const SELECTION& ) [this] (const SELECTION& )
{ {
@ -1027,6 +1033,7 @@ void FOOTPRINT_EDIT_FRAME::setupUIConditions()
}; };
mgr->SetConditions( ACTIONS::highContrastMode, CHECK( highContrastCond ) ); mgr->SetConditions( ACTIONS::highContrastMode, CHECK( highContrastCond ) );
mgr->SetConditions( PCB_ACTIONS::flipBoard, CHECK( boardFlippedCond ) );
mgr->SetConditions( PCB_ACTIONS::toggleFootprintTree, CHECK( footprintTreeCond ) ); mgr->SetConditions( PCB_ACTIONS::toggleFootprintTree, CHECK( footprintTreeCond ) );
mgr->SetConditions( ACTIONS::print, ENABLE( haveFootprintCond ) ); mgr->SetConditions( ACTIONS::print, ENABLE( haveFootprintCond ) );

View File

@ -172,6 +172,8 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
contrastModeSubMenu->Add( PCB_ACTIONS::layerAlphaInc ); contrastModeSubMenu->Add( PCB_ACTIONS::layerAlphaInc );
viewMenu->Add( contrastModeSubMenu ); viewMenu->Add( contrastModeSubMenu );
viewMenu->Add( PCB_ACTIONS::flipBoard, ACTION_MENU::CHECK );
viewMenu->AppendSeparator(); viewMenu->AppendSeparator();
viewMenu->Add( PCB_ACTIONS::toggleFootprintTree, ACTION_MENU::CHECK ); viewMenu->Add( PCB_ACTIONS::toggleFootprintTree, ACTION_MENU::CHECK );