Pcbnew: Array tool should not number NPTHs
Devolve the logic as to whether a pad should be numbered or not to a pad utility function. Add a very simplistic test for this function (demonstrating how to test BOARD_ITEMs in general). Fixes: lp:1804787 * https://bugs.launchpad.net/kicad/+bug/1804787
This commit is contained in:
committed by
Seth Hillbrand
parent
81bac449d3
commit
ec91329da0
@@ -27,7 +27,9 @@
|
||||
*/
|
||||
|
||||
#include "array_creator.h"
|
||||
|
||||
#include <board_commit.h>
|
||||
#include <pad_naming.h>
|
||||
|
||||
#include <dialogs/dialog_create_array.h>
|
||||
|
||||
@@ -108,7 +110,7 @@ void ARRAY_CREATOR::Invoke()
|
||||
{
|
||||
D_PAD* pad = static_cast<D_PAD*>( new_item );
|
||||
|
||||
if( !pad->IsAperturePad() )
|
||||
if( PAD_NAMING::PadCanHaveName( *pad ) )
|
||||
pad->SetName( array_opts->GetItemNumber( ptN ) );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user