Don't allow selecting of invisible zones.

Fixes https://gitlab.com/kicad/code/kicad/issues/6225
This commit is contained in:
Jeff Young 2020-10-31 22:49:28 +00:00
parent 8bfde9db6c
commit f720b8aa2a
1 changed files with 3 additions and 0 deletions

View File

@ -1851,6 +1851,9 @@ bool SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibilityOn
case PCB_ZONE_AREA_T: case PCB_ZONE_AREA_T:
case PCB_FP_ZONE_AREA_T: case PCB_FP_ZONE_AREA_T:
{ {
if( !board()->IsElementVisible( LAYER_ZONES ) )
return false;
const ZONE_CONTAINER* zone = static_cast<const ZONE_CONTAINER*>( aItem ); const ZONE_CONTAINER* zone = static_cast<const ZONE_CONTAINER*>( aItem );
// Check to see if this keepout is part of a footprint // Check to see if this keepout is part of a footprint