|
|
@ -1024,11 +1024,23 @@ void FOOTPRINT_EDIT_FRAME::setupUIConditions() |
|
|
|
mgr->SetConditions( ACTIONS::duplicate, ENABLE( cond.HasItems() ) ); |
|
|
|
mgr->SetConditions( ACTIONS::selectAll, ENABLE( cond.HasItems() ) ); |
|
|
|
|
|
|
|
auto haveAtLeastOneGroupCond = |
|
|
|
[]( const SELECTION& aSel ) |
|
|
|
{ |
|
|
|
for( EDA_ITEM* item : aSel ) |
|
|
|
{ |
|
|
|
if( item->Type() == PCB_GROUP_T ) |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
}; |
|
|
|
|
|
|
|
mgr->SetConditions( PCB_ACTIONS::rotateCw, ENABLE( cond.HasItems() ) ); |
|
|
|
mgr->SetConditions( PCB_ACTIONS::rotateCcw, ENABLE( cond.HasItems() ) ); |
|
|
|
mgr->SetConditions( PCB_ACTIONS::mirror, ENABLE( cond.HasItems() ) ); |
|
|
|
mgr->SetConditions( PCB_ACTIONS::group, ENABLE( SELECTION_CONDITIONS::MoreThan( 1 ) ) ); |
|
|
|
mgr->SetConditions( PCB_ACTIONS::ungroup, ENABLE( cond.HasItems() ) ); |
|
|
|
mgr->SetConditions( PCB_ACTIONS::ungroup, ENABLE( haveAtLeastOneGroupCond ) ); |
|
|
|
|
|
|
|
mgr->SetConditions( PCB_ACTIONS::padDisplayMode, CHECK( !cond.PadFillDisplay() ) ); |
|
|
|
mgr->SetConditions( PCB_ACTIONS::textOutlines, CHECK( !cond.TextFillDisplay() ) ); |
|
|
|