diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index a320dcccbc..df9d4c851d 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -415,16 +415,6 @@ void SCH_EDIT_FRAME::setupUIConditions() return m_auimgr.GetPane( SchematicHierarchyPaneName() ).IsShown(); }; - auto orientCondition = - []( const SELECTION& aSel ) - { - if( SCH_LINE_WIRE_BUS_TOOL::IsDrawingLineWireOrBus( aSel ) ) - return false; - - return SELECTION_CONDITIONS::HasTypes( SCH_EDIT_TOOL::RotatableItems )( aSel ); - }; - - #define ENABLE( x ) ACTION_CONDITIONS().Enable( x ) #define CHECK( x ) ACTION_CONDITIONS().Check( x ) @@ -454,10 +444,10 @@ void SCH_EDIT_FRAME::setupUIConditions() mgr->SetConditions( ACTIONS::duplicate, ENABLE( hasElements ) ); mgr->SetConditions( ACTIONS::selectAll, ENABLE( hasElements ) ); - mgr->SetConditions( EE_ACTIONS::rotateCW, ENABLE( orientCondition ) ); - mgr->SetConditions( EE_ACTIONS::rotateCCW, ENABLE( orientCondition ) ); - mgr->SetConditions( EE_ACTIONS::mirrorH, ENABLE( orientCondition ) ); - mgr->SetConditions( EE_ACTIONS::mirrorV, ENABLE( orientCondition ) ); + mgr->SetConditions( EE_ACTIONS::rotateCW, ENABLE( hasElements ) ); + mgr->SetConditions( EE_ACTIONS::rotateCCW, ENABLE( hasElements ) ); + mgr->SetConditions( EE_ACTIONS::mirrorH, ENABLE( hasElements ) ); + mgr->SetConditions( EE_ACTIONS::mirrorV, ENABLE( hasElements ) ); mgr->SetConditions( ACTIONS::zoomTool, CHECK( cond.CurrentTool( ACTIONS::zoomTool ) ) ); diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index 8883d7ce89..b39de81b7d 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -684,23 +684,6 @@ void PCB_EDIT_FRAME::setupUIConditions() mgr->SetConditions( ACTIONS::doDelete, ENABLE( cond.HasItems() ) ); mgr->SetConditions( ACTIONS::duplicate, ENABLE( cond.HasItems() ) ); - auto canMirror = - [ this ]( const SELECTION& aSelection ) - { - if( !this->IsType( FRAME_FOOTPRINT_EDITOR ) - && SELECTION_CONDITIONS::OnlyTypes( { PCB_PAD_T } )( aSelection ) ) - { - return false; - } - - return SELECTION_CONDITIONS::HasTypes( EDIT_TOOL::MirrorableItems )( aSelection ); - }; - - mgr->SetConditions( PCB_ACTIONS::rotateCcw, ENABLE( SELECTION_CONDITIONS::NotEmpty ) ); - mgr->SetConditions( PCB_ACTIONS::rotateCw, ENABLE( SELECTION_CONDITIONS::NotEmpty ) ); - mgr->SetConditions( PCB_ACTIONS::mirrorH, ENABLE( canMirror ) ); - mgr->SetConditions( PCB_ACTIONS::mirrorV, ENABLE( canMirror ) ); - mgr->SetConditions( PCB_ACTIONS::group, ENABLE( SELECTION_CONDITIONS::MoreThan( 1 ) ) ); mgr->SetConditions( PCB_ACTIONS::ungroup, ENABLE( SELECTION_CONDITIONS::HasType( PCB_GROUP_T ) ) ); mgr->SetConditions( PCB_ACTIONS::lock, ENABLE( PCB_SELECTION_CONDITIONS::HasUnlockedItems ) );