A more generic error message when route start pt violates DRC.

Fixes https://gitlab.com/kicad/code/kicad/issues/1812
This commit is contained in:
Jeff Young 2020-11-01 18:22:31 +00:00
parent 7c505da368
commit a95e2184da
3 changed files with 4 additions and 4 deletions

View File

@ -677,14 +677,14 @@ void EDA_BASE_FRAME::PrintMsg( const wxString& text )
void EDA_BASE_FRAME::ShowInfoBarError( const wxString& aErrorMsg ) void EDA_BASE_FRAME::ShowInfoBarError( const wxString& aErrorMsg )
{ {
m_infoBar->RemoveAllButtons(); m_infoBar->RemoveAllButtons();
GetInfoBar()->ShowMessageFor( aErrorMsg, 5000, wxICON_ERROR ); GetInfoBar()->ShowMessageFor( aErrorMsg, 8000, wxICON_ERROR );
} }
void EDA_BASE_FRAME::ShowInfoBarWarning( const wxString& aWarningMsg ) void EDA_BASE_FRAME::ShowInfoBarWarning( const wxString& aWarningMsg )
{ {
m_infoBar->RemoveAllButtons(); m_infoBar->RemoveAllButtons();
GetInfoBar()->ShowMessageFor( aWarningMsg, 5000, wxICON_WARNING ); GetInfoBar()->ShowMessageFor( aWarningMsg, 8000, wxICON_WARNING );
} }

View File

@ -191,7 +191,7 @@ bool ROUTER::StartRouting( const VECTOR2I& aP, ITEM* aStartItem, int aLayer )
if( ! isStartingPointRoutable( aP, aLayer ) ) if( ! isStartingPointRoutable( aP, aLayer ) )
{ {
SetFailureReason( _("Cannot start routing inside a keepout area or board outline." ) ); SetFailureReason( _( "The routing start point violates DRC." ) );
return false; return false;
} }

View File

@ -938,7 +938,7 @@ bool ROUTER_TOOL::prepareInteractive()
if( !m_router->StartRouting( m_startSnapPoint, m_startItem, routingLayer ) ) if( !m_router->StartRouting( m_startSnapPoint, m_startItem, routingLayer ) )
{ {
DisplayError( frame(), m_router->FailureReason() ); frame()->ShowInfoBarError( m_router->FailureReason() );
highlightNet( false ); highlightNet( false );
controls()->SetAutoPan( false ); controls()->SetAutoPan( false );
return false; return false;