Implement and enable option to not shove vias during push & shove routing

This commit is contained in:
Stefan Hamminga 2022-08-25 09:26:25 +03:00 committed by Mike Williams
parent 2d68cdff94
commit 2ff6a6aee1
3 changed files with 1 additions and 3 deletions

View File

@ -55,7 +55,6 @@ DIALOG_PNS_SETTINGS::DIALOG_PNS_SETTINGS( wxWindow* aParent, PNS::ROUTING_SETTIN
// Don't show options that are not implemented
m_suggestEnding->Hide();
m_shoveVias->Hide();
SetDefaultItem( m_stdButtonsOK );
GetSizer()->Fit( this );

View File

@ -29,7 +29,6 @@ DIALOG_PNS_SETTINGS_BASE::DIALOG_PNS_SETTINGS_BASE( wxWindow* parent, wxWindowID
bOptions->Add( m_freeAngleMode, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_shoveVias = new wxCheckBox( bOptions->GetStaticBox(), wxID_ANY, _("Shove vias"), wxDefaultPosition, wxDefaultSize, 0 );
m_shoveVias->Enable( false );
m_shoveVias->SetToolTip( _("When disabled, vias are treated as un-movable objects and hugged instead of shoved.") );
bOptions->Add( m_shoveVias, 0, wxTOP|wxRIGHT|wxLEFT, 5 );

View File

@ -880,7 +880,7 @@ SHOVE::SHOVE_STATUS SHOVE::pushOrShoveVia( VIA* aVia, const VECTOR2I& aForce, in
return SH_INCOMPLETE;
}
if( aVia->IsLocked() )
if( Settings().ShoveVias() == false || aVia->IsLocked() )
return SH_TRY_WALK;
if( jt->IsLocked() )