diff --git a/pcbnew/dialogs/panel_setup_rules.cpp b/pcbnew/dialogs/panel_setup_rules.cpp index b3dbaab544..17a5efa1a1 100644 --- a/pcbnew/dialogs/panel_setup_rules.cpp +++ b/pcbnew/dialogs/panel_setup_rules.cpp @@ -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|" diff --git a/pcbnew/dialogs/panel_setup_rules.h b/pcbnew/dialogs/panel_setup_rules.h index a94200dbb8..9ceac5702e 100644 --- a/pcbnew/dialogs/panel_setup_rules.h +++ b/pcbnew/dialogs/panel_setup_rules.h @@ -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;