Report silk/edge collisions.

Fixes https://gitlab.com/kicad/code/kicad/issues/5854

Fixes https://gitlab.com/kicad/code/kicad/issues/4892
This commit is contained in:
Jeff Young 2020-10-06 13:20:29 +01:00
parent f620f8bdd3
commit 0bc7bbbadb
5 changed files with 28 additions and 1 deletions

View File

@ -118,8 +118,11 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
{
bool tokenUpdated = false;
if( token->IsSameAs( wxT( "KICAD_VERSION" ) ) )
if( token->IsSameAs( wxT( "KICAD_VERSION" ) ) && PgmOrNull() )
{
// TODO: it'd be nice to get the Python script name/version here for when
// PgmOrNull() is null...
*token = wxString::Format( wxT( "%s%s %s" ),
productName,
Pgm().App().GetAppName(),

View File

@ -121,6 +121,12 @@ PGM_BASE& Pgm()
}
// Similar to PGM_BASE& Pgm(), but return nullptr when a *.ki_face is run from a python script.
PGM_BASE* PgmOrNull()
{
return process;
}
bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits )
{
InitSettings( new GERBVIEW_SETTINGS );

View File

@ -69,6 +69,12 @@ PGM_BASE& Pgm()
}
// Similar to PGM_BASE& Pgm(), but return nullptr when a *.ki_face is run from a python script.
PGM_BASE* PgmOrNull()
{
return &program;
}
PGM_KICAD& PgmTop()
{
return program;

View File

@ -124,6 +124,12 @@ PGM_BASE& Pgm()
}
// Similar to PGM_BASE& Pgm(), but return nullptr when a *.ki_face is run from a python script.
PGM_BASE* PgmOrNull()
{
return process;
}
bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits )
{
InitSettings( new PL_EDITOR_SETTINGS );

View File

@ -95,6 +95,12 @@ PGM_BASE& Pgm()
}
// Similar to PGM_BASE& Pgm(), but return nullptr when a *.ki_face is run from a python script.
PGM_BASE* PgmOrNull()
{
return process;
}
bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits )
{
InitSettings( new PCB_CALCULATOR_SETTINGS );