Add DRC suggestions for Via_Type

This commit is contained in:
Alex 2023-01-23 05:10:47 +03:00
parent e7a4d6d4da
commit 1aca216f18
2 changed files with 9 additions and 1 deletions

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -58,6 +58,7 @@ PANEL_SETUP_RULES::PANEL_SETUP_RULES( PAGED_DIALOG* aParent, PCB_EDIT_FRAME* aFr
m_netClassRegex.Compile( "^NetClass\\s*[!=]=\\s*$", wxRE_ADVANCED );
m_netNameRegex.Compile( "^NetName\\s*[!=]=\\s*$", wxRE_ADVANCED );
m_typeRegex.Compile( "^Type\\s*[!=]=\\s*$", wxRE_ADVANCED );
m_viaTypeRegex.Compile( "^Via_Type\\s*[!=]=\\s*$", wxRE_ADVANCED );
m_padTypeRegex.Compile( "^Pad_Type\\s*[!=]=\\s*$", wxRE_ADVANCED );
m_pinTypeRegex.Compile( "^Pin_Type\\s*[!=]=\\s*$", wxRE_ADVANCED );
m_fabPropRegex.Compile( "^Fabrication_Property\\s*[!=]=\\s*$", wxRE_ADVANCED );
@ -497,6 +498,12 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
"Via|"
"Zone" );
}
else if( m_viaTypeRegex.Matches( last ) )
{
tokens = wxT( "Through|"
"Blind/buried|"
"Micro" );
}
else if( m_padTypeRegex.Matches( last ) )
{
tokens = wxT( "Through-hole|"

View File

@ -61,6 +61,7 @@ private:
wxRegEx m_netClassRegex;
wxRegEx m_netNameRegex;
wxRegEx m_typeRegex;
wxRegEx m_viaTypeRegex;
wxRegEx m_padTypeRegex;
wxRegEx m_pinTypeRegex;
wxRegEx m_fabPropRegex;