"Select Connection" menus enablement

Previously, the "Select Connection" sub-items were greyed out when the
selection contained both tracks and vias. This meant that you couldn't
access "Select Copper Connection" when the selection contained both
tracks and vias (though the keyboard shortcuts did work).

Change to use SELECTION_CONDITIONS::OnlyTypes( GENERAL_COLLECTOR::Tracks
) to allow any combination of track elements to be selected.

Fixes: lp:1772249
* https://bugs.launchpad.net/kicad/+bug/1772249
This commit is contained in:
John Beard 2018-06-11 12:28:02 +01:00 committed by Seth Hillbrand
parent 0555bbc656
commit 896ad3774d
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ private:
const auto& selection = getToolManager()->GetTool<SELECTION_TOOL>()->GetSelection();
bool connItem = ( S_C::OnlyType( PCB_VIA_T ) || S_C::OnlyType( PCB_TRACE_T ) )( selection );
bool connItem = S_C::OnlyTypes( GENERAL_COLLECTOR::Tracks )( selection );
bool sheetSelEnabled = ( S_C::OnlyType( PCB_MODULE_T ) )( selection );
Enable( getMenuId( PCB_ACTIONS::selectNet ), connItem );