pcbnew: Violate DRC only enabled in Highlight mode

Violating the DRC cannot happen in shove or walk around mode as we use
the DRC to calculate these actions.  The tooltip explains this as well
but we need to explicitly disable the checkbox to prevent users from
thinking that they can complete DRC violating tracks in other modes.
This commit is contained in:
Seth Hillbrand 2019-02-23 08:10:21 -08:00
parent f47089a804
commit d36fbba1f3
1 changed files with 6 additions and 0 deletions

View File

@ -80,10 +80,16 @@ void DIALOG_PNS_SETTINGS::OnOkClick( wxCommandEvent& aEvent )
void DIALOG_PNS_SETTINGS::onModeChange( wxCommandEvent& aEvent )
{
if( m_mode->GetSelection() == PNS::RM_MarkObstacles )
{
m_freeAngleMode->Enable();
m_violateDrc->Enable();
}
else
{
m_freeAngleMode->SetValue( false );
m_freeAngleMode->Enable( false );
m_violateDrc->SetValue( false );
m_violateDrc->Enable( false );
}
}