Break apart locked items from the rest of the selection filter

Disable selection of locked items by default

See discussion in https://gitlab.com/kicad/code/kicad/-/issues/5793
This commit is contained in:
Jon Evans 2020-09-28 19:58:08 -04:00
parent 8dfb5b5640
commit 74b0e1fa47
3 changed files with 9 additions and 4 deletions

View File

@ -62,15 +62,21 @@ struct SELECTION_FILTER_OPTIONS
otherItems = true;
}
/**
* @return true if any of the item types are enabled (excluding "locked items" which is special)
*/
bool Any()
{
return ( lockedItems || footprints || text || tracks || vias || pads || graphics || zones
return ( footprints || text || tracks || vias || pads || graphics || zones
|| keepouts || dimensions || otherItems );
}
/**
* @return true if all the item types are enabled (excluding "locked items" which is special)
*/
bool All()
{
return ( lockedItems && footprints && text && tracks && vias && pads && graphics && zones
return ( footprints && text && tracks && vias && pads && graphics && zones
&& keepouts && dimensions && otherItems );
}
};

View File

@ -105,7 +105,7 @@ SELECTION_TOOL::SELECTION_TOOL() :
m_enteredGroup( nullptr ),
m_priv( std::make_unique<PRIV>() )
{
m_filter.lockedItems = true;
m_filter.lockedItems = false;
m_filter.footprints = true;
m_filter.text = true;
m_filter.tracks = true;

View File

@ -77,7 +77,6 @@ void PANEL_SELECTION_FILTER::OnFilterChanged( wxCommandEvent& aEvent )
{
bool newState = m_cbAllItems->GetValue();
m_cbLockedItems->SetValue( newState );
m_cbFootprints->SetValue( newState );
m_cbText->SetValue( newState );
m_cbTracks->SetValue( newState );