Pcbnew: add a step field to the array tool

This is useful, for example, when arraying only one side
of a connector.

Fixes: lp:1809580
* https://bugs.launchpad.net/kicad/+bug/1809580
This commit is contained in:
John Beard
2019-05-16 11:20:52 +01:00
parent eb1e67583f
commit 0eb8f92c69
7 changed files with 464 additions and 58 deletions
+8 -2
View File
@@ -35,7 +35,7 @@ static bool schemeNonUnitColsStartAt0( ARRAY_AXIS::NUMBERING_TYPE type )
}
ARRAY_AXIS::ARRAY_AXIS() : m_type( NUMBERING_TYPE::NUMBERING_NUMERIC ), m_offset( 0 )
ARRAY_AXIS::ARRAY_AXIS() : m_type( NUMBERING_TYPE::NUMBERING_NUMERIC ), m_offset( 0 ), m_step( 1 )
{
}
@@ -124,6 +124,12 @@ int ARRAY_AXIS::GetOffset() const
}
void ARRAY_AXIS::SetStep( int aStep )
{
m_step = aStep;
}
wxString ARRAY_AXIS::GetItemNumber( int n ) const
{
wxString itemNum;
@@ -134,7 +140,7 @@ wxString ARRAY_AXIS::GetItemNumber( int n ) const
bool firstRound = true;
int radix = alphabet.Length();
n += m_offset;
n = m_offset + m_step * n;
do
{