Disable mirror commands when a single footprint is selected.

Fixes https://gitlab.com/kicad/code/kicad/issues/12752
This commit is contained in:
Jeff Young 2022-10-28 19:11:45 +01:00
parent 7a874255c5
commit 3b3e6de515
1 changed files with 4 additions and 2 deletions

View File

@ -201,8 +201,10 @@ bool EDIT_TOOL::Init()
menu.AddItem( PCB_ACTIONS::rotateCcw, SELECTION_CONDITIONS::NotEmpty );
menu.AddItem( PCB_ACTIONS::rotateCw, SELECTION_CONDITIONS::NotEmpty );
menu.AddItem( PCB_ACTIONS::flip, SELECTION_CONDITIONS::NotEmpty );
menu.AddItem( PCB_ACTIONS::mirrorH, SELECTION_CONDITIONS::NotEmpty );
menu.AddItem( PCB_ACTIONS::mirrorV, SELECTION_CONDITIONS::NotEmpty );
menu.AddItem( PCB_ACTIONS::mirrorH, SELECTION_CONDITIONS::NotEmpty
&& !singleFootprintCondition );
menu.AddItem( PCB_ACTIONS::mirrorV, SELECTION_CONDITIONS::NotEmpty
&& !singleFootprintCondition );
menu.AddItem( PCB_ACTIONS::swap, SELECTION_CONDITIONS::MoreThan( 1 ) );
menu.AddItem( PCB_ACTIONS::packAndMoveFootprints, SELECTION_CONDITIONS::MoreThan( 1 )
&& SELECTION_CONDITIONS::HasType( PCB_FOOTPRINT_T ) );