diff --git a/eeschema/bus-wire-junction.cpp b/eeschema/bus-wire-junction.cpp
index 513d837b0e..62141bd93f 100644
--- a/eeschema/bus-wire-junction.cpp
+++ b/eeschema/bus-wire-junction.cpp
@@ -443,10 +443,10 @@ void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC )
}
else
{
- my_clone->Move( wxPoint( g_RepeatStep.GetWidth(), g_RepeatStep.GetHeight() ) );
+ my_clone->Move( GetRepeatStep() );
if( my_clone->CanIncrementLabel() )
- ( (SCH_TEXT*) my_clone )->IncrementLabel();
+ ( (SCH_TEXT*) my_clone )->IncrementLabel( GetRepeatDeltaLabel() );
GetScreen()->Append( my_clone );
GetScreen()->TestDanglingEnds();
diff --git a/eeschema/dialogs/dialog_eeschema_options_base.cpp b/eeschema/dialogs/dialog_eeschema_options_base.cpp
index 6347d48c8c..cd4356e01b 100644
--- a/eeschema/dialogs/dialog_eeschema_options_base.cpp
+++ b/eeschema/dialogs/dialog_eeschema_options_base.cpp
@@ -134,7 +134,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
m_staticText16->Wrap( -1 );
fgSizer1->Add( m_staticText16, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 3 );
- m_spinRepeatLabel = new wxSpinCtrl( m_panel1, wxID_ANY, wxT("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 10, 1 );
+ m_spinRepeatLabel = new wxSpinCtrl( m_panel1, wxID_ANY, wxT("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, -10, 10, 1 );
fgSizer1->Add( m_spinRepeatLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
@@ -213,7 +213,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
m_panel1->SetSizer( p1mainSizer );
m_panel1->Layout();
p1mainSizer->Fit( m_panel1 );
- m_notebook->AddPage( m_panel1, _("General Options"), false );
+ m_notebook->AddPage( m_panel1, _("General Options"), true );
m_panel2 = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_panel2->SetToolTip( _("User defined field names for schematic components. ") );
@@ -258,7 +258,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
m_panel2->SetSizer( bSizer6 );
m_panel2->Layout();
bSizer6->Fit( m_panel2 );
- m_notebook->AddPage( m_panel2, _("Template Field Names"), true );
+ m_notebook->AddPage( m_panel2, _("Template Field Names"), false );
bOptionsSizer->Add( m_notebook, 1, wxALL|wxEXPAND, 5 );
diff --git a/eeschema/dialogs/dialog_eeschema_options_base.fbp b/eeschema/dialogs/dialog_eeschema_options_base.fbp
index c70445ab2c..ecbf7736a2 100644
--- a/eeschema/dialogs/dialog_eeschema_options_base.fbp
+++ b/eeschema/dialogs/dialog_eeschema_options_base.fbp
@@ -187,7 +187,7 @@
@@ -1687,7 +2630,7 @@
0
0
- m_sdbSizer1
+ m_sdbSizer
protected
diff --git a/eeschema/dialogs/dialog_libedit_options_base.h b/eeschema/dialogs/dialog_libedit_options_base.h
index 88de1b6d08..2b43354c44 100644
--- a/eeschema/dialogs/dialog_libedit_options_base.h
+++ b/eeschema/dialogs/dialog_libedit_options_base.h
@@ -54,16 +54,27 @@ class DIALOG_LIBEDIT_OPTIONS_BASE : public DIALOG_SHIM
wxStaticText* m_staticText9;
wxSpinCtrl* m_spinPinNameSize;
wxStaticText* m_staticRepeatXUnits;
+ wxStaticText* m_staticText11;
+ wxSpinCtrl* m_spinRepeatHorizontal;
+ wxStaticText* m_staticText12;
+ wxStaticText* m_staticText13;
+ wxSpinCtrl* m_spinRepeatVertical;
+ wxStaticText* m_staticText14;
+ wxStaticText* m_staticText15;
+ wxChoice* m_choicePinDisplacement;
+ wxStaticText* m_staticText16;
+ wxStaticText* m_staticText17;
+ wxSpinCtrl* m_spinRepeatLabel;
wxStaticLine* m_staticline3;
wxCheckBox* m_checkShowGrid;
wxStaticLine* m_staticline2;
- wxStdDialogButtonSizer* m_sdbSizer1;
- wxButton* m_sdbSizer1OK;
- wxButton* m_sdbSizer1Cancel;
+ wxStdDialogButtonSizer* m_sdbSizer;
+ wxButton* m_sdbSizerOK;
+ wxButton* m_sdbSizerCancel;
public:
- DIALOG_LIBEDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Library Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 492,244 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ DIALOG_LIBEDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Library Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 492,403 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_LIBEDIT_OPTIONS_BASE();
};
diff --git a/eeschema/edit_label.cpp b/eeschema/edit_label.cpp
index 049bdc8081..2be1d87b16 100644
--- a/eeschema/edit_label.cpp
+++ b/eeschema/edit_label.cpp
@@ -292,9 +292,9 @@ void SCH_EDIT_FRAME::OnConvertTextType( wxCommandEvent& aEvent )
/* Function to increment bus label members numbers,
* i.e. when a text is ending with a number, adds
- * to this number
+ * aIncrement to this number
*/
-void IncrementLabelMember( wxString& name )
+void IncrementLabelMember( wxString& name, int aIncrement )
{
int ii, nn;
long number = 0;
@@ -314,7 +314,7 @@ void IncrementLabelMember( wxString& name )
if( litt_number.ToLong( &number ) )
{
- number += g_RepeatDeltaLabel;
+ number += aIncrement;
name.Remove( ii ); name << number;
}
}
diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp
index 5f32e567d1..9472f557e7 100644
--- a/eeschema/eeschema.cpp
+++ b/eeschema/eeschema.cpp
@@ -48,13 +48,10 @@
#include
-
-// Global variables
-wxSize g_RepeatStep;
-int g_RepeatDeltaLabel;
-int g_DefaultBusWidth;
+// The main sheet of the project
SCH_SHEET* g_RootSheet = NULL;
+// a transform matrix, to display components in lib editor
TRANSFORM DefaultTransform = TRANSFORM( 1, 0, 0, -1 );
diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp
index 113e7868a3..5c6b140b99 100644
--- a/eeschema/eeschema_config.cpp
+++ b/eeschema/eeschema_config.cpp
@@ -57,7 +57,7 @@
#define FR_HISTORY_LIST_CNT 10 ///< Maximum number of find and replace strings.
-static int s_defaultBusThickness = 15;
+static int s_defaultBusThickness = DEFAULTBUSTHICKNESS;
int GetDefaultBusThickness()
{
@@ -93,7 +93,7 @@ void SetDefaultTextSize( int aTextSize )
* Default line (in Eeschema units) thickness used to draw/plot items having a
* default thickness line value (i.e. = 0 ).
*/
-static int s_drawDefaultLineThickness;
+static int s_drawDefaultLineThickness = DEFAULTDRAWLINETHICKNESS;
int GetDefaultLineThickness()
@@ -320,9 +320,9 @@ void SCH_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
dlg.SetBusWidth( GetDefaultBusThickness() );
dlg.SetLineWidth( GetDefaultLineThickness() );
dlg.SetTextSize( GetDefaultTextSize() );
- dlg.SetRepeatHorizontal( g_RepeatStep.x );
- dlg.SetRepeatVertical( g_RepeatStep.y );
- dlg.SetRepeatLabel( g_RepeatDeltaLabel );
+ dlg.SetRepeatHorizontal( GetRepeatStep().x );
+ dlg.SetRepeatVertical( GetRepeatStep().y );
+ dlg.SetRepeatLabel( GetRepeatDeltaLabel() );
dlg.SetAutoSaveInterval( GetAutoSaveInterval() / 60 );
dlg.SetRefIdSeparator( LIB_PART::GetSubpartIdSeparator(),
LIB_PART::GetSubpartFirstId() );
@@ -367,15 +367,11 @@ void SCH_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
saveProjectConfig = true;
}
- if( g_RepeatStep.x != dlg.GetRepeatHorizontal() ||
- g_RepeatStep.y != dlg.GetRepeatVertical() ||
- g_RepeatDeltaLabel != dlg.GetRepeatLabel() )
- {
- g_RepeatStep.x = dlg.GetRepeatHorizontal();
- g_RepeatStep.y = dlg.GetRepeatVertical();
- g_RepeatDeltaLabel = dlg.GetRepeatLabel();
- saveProjectConfig = true;
- }
+ wxPoint step;
+ step.x = dlg.GetRepeatHorizontal();
+ step.y = dlg.GetRepeatVertical();
+ SetRepeatStep( step );
+ SetRepeatDeltaLabel( dlg.GetRepeatLabel() );
SetAutoSaveInterval( dlg.GetAutoSaveInterval() * 60 );
SetGridVisibility( dlg.GetShowGrid() );
@@ -441,15 +437,6 @@ PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetProjectFileParametersList()
m_projectFileParams.push_back( new PARAM_CFG_BOOL( wxT( "SpiceUseNetNumbers" ),
&m_spiceNetlistUseNetcodeAsNetname, false ) );
- m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "RptD_X" ),
- &g_RepeatStep.x,
- 0, -1000, +1000 ) );
- m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "RptD_Y" ),
- &g_RepeatStep.y,
- 100, -1000, +1000 ) );
- m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "RptLab" ),
- &g_RepeatDeltaLabel,
- 1, -10, +10 ) );
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "LabSize" ),
&s_defaultTextSize,
DEFAULT_SIZE_TEXT, 5,
@@ -545,6 +532,10 @@ static const wxChar lastLibImportPathEntry[] = wxT( "LastLibraryImportPath"
static const wxChar defaultPinNumSizeEntry[] = wxT( "LibeditPinNumSize" );
static const wxChar defaultPinNameSizeEntry[] = wxT( "LibeditPinNameSize" );
static const wxChar DefaultPinLengthEntry[] = wxT( "DefaultPinLength" );
+static const wxChar repeatLibLabelIncEntry[] = wxT( "LibeditRepeatLabelInc" );
+static const wxChar pinRepeatStepEntry[] = wxT( "LibeditPinRepeatStep" );
+static const wxChar repeatLibStepXEntry[] = wxT( "LibeditRepeatStepX" );
+static const wxChar repeatLibStepYEntry[] = wxT( "LibeditRepeatStepY" );
PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetConfigurationSettings()
@@ -562,6 +553,19 @@ PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetConfigurationSettings()
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PrintSheetReferenceAndTitleBlock" ),
&m_printSheetReference, true ) );
+ m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "RepeatStepX" ),
+ &m_repeatStep.x,
+ DEFAULT_REPEAT_OFFSET_X,
+ -REPEAT_OFFSET_MAX,
+ REPEAT_OFFSET_MAX ) );
+ m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "RepeatStepY" ),
+ &m_repeatStep.y,
+ DEFAULT_REPEAT_OFFSET_Y,
+ -REPEAT_OFFSET_MAX,
+ REPEAT_OFFSET_MAX ) );
+ m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "RepeatLabelIncrement" ),
+ &m_repeatDeltaLabel,
+ DEFAULT_REPEAT_LABEL_INC, -10, +10 ) );
return m_configSettings;
}
@@ -746,6 +750,12 @@ void LIB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
SetDefaultPinLength( aCfg->Read( DefaultPinLengthEntry, DEFAULTPINLENGTH ) );
m_textPinNumDefaultSize = aCfg->Read( defaultPinNumSizeEntry, DEFAULTPINNUMSIZE );
m_textPinNameDefaultSize = aCfg->Read( defaultPinNameSizeEntry, DEFAULTPINNAMESIZE );
+ SetRepeatDeltaLabel( aCfg->Read( repeatLibLabelIncEntry, DEFAULT_REPEAT_LABEL_INC ) );
+ SetRepeatPinStep( aCfg->Read( pinRepeatStepEntry, DEFAULT_REPEAT_OFFSET_PIN ) );
+ wxPoint step;
+ step.x = aCfg->Read( repeatLibStepXEntry, (long)DEFAULT_REPEAT_OFFSET_X );
+ step.y = aCfg->Read( repeatLibStepYEntry, (long)DEFAULT_REPEAT_OFFSET_Y );
+ SetRepeatStep( step );
}
@@ -758,10 +768,15 @@ void LIB_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
aCfg->Write( lastLibExportPathEntry, m_lastLibExportPath );
aCfg->Write( lastLibImportPathEntry, m_lastLibImportPath );
aCfg->Write( DefaultPinLengthEntry, (long) GetDefaultPinLength() );
- aCfg->Write( defaultPinNumSizeEntry, (long) m_textPinNumDefaultSize );
- aCfg->Write( defaultPinNameSizeEntry, (long) m_textPinNameDefaultSize );
+ aCfg->Write( defaultPinNumSizeEntry, (long) GetPinNumDefaultSize() );
+ aCfg->Write( defaultPinNameSizeEntry, (long) GetPinNameDefaultSize() );
+ aCfg->Write( repeatLibLabelIncEntry, (long) GetRepeatDeltaLabel() );
+ aCfg->Write( pinRepeatStepEntry, (long) GetRepeatPinStep() );
+ aCfg->Write( repeatLibStepXEntry, (long) GetRepeatStep().x );
+ aCfg->Write( repeatLibStepYEntry, (long) GetRepeatStep().y );
}
+
void LIB_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
{
wxArrayString units;
@@ -790,6 +805,9 @@ void LIB_EDIT_FRAME::OnPreferencesOptions( wxCommandEvent& event )
m_textPinNumDefaultSize = dlg.GetPinNumSize();
m_textPinNameDefaultSize = dlg.GetPinNameSize();
SetGridVisibility( dlg.GetShowGrid() );
+ SetRepeatPinStep( dlg.GetPinRepeatStep() );
+ SetRepeatStep( dlg.GetItemRepeatStep() );
+ SetRepeatDeltaLabel( dlg.GetRepeatLabelInc() );
SaveSettings( config() ); // save values shared by eeschema applications.
diff --git a/eeschema/general.h b/eeschema/general.h
index 42ecad26b1..7f8b147437 100644
--- a/eeschema/general.h
+++ b/eeschema/general.h
@@ -37,11 +37,19 @@ class SCH_SHEET;
#define EESCHEMA_VERSION 2
#define SCHEMATIC_HEAD_STRING "Schematic File Version"
-#define TXTMARGE 10 // Offset in mils for placement of labels and pin numbers
+#define TXTMARGE 10 // Offset in mils for placement of labels and pin numbers
#define DANGLING_SYMBOL_SIZE 12
+
+#define DEFAULT_REPEAT_OFFSET_X 0 ///< the default X value (overwritten by the eeschema config)
+#define DEFAULT_REPEAT_OFFSET_Y 100 ///< the default Y value (overwritten by the eeschema config)
+#define REPEAT_OFFSET_MAX 1000 ///< the max value of repeat offset value
+#define DEFAULT_REPEAT_LABEL_INC 1 ///< the default value (overwritten by the eeschema config)
+#define DEFAULT_REPEAT_OFFSET_PIN 100 ///< the default value (overwritten by the eeschema config)
+ ///< when repeating a pin
+
///< The thickness to draw busses that do not have a specific width
-// (can be changed in preference menu)
+///< (can be changed in preference menu)
#define DEFAULTBUSTHICKNESS 12
///< The thickness to draw lines that thickness is set to 0 (default thickness)
@@ -103,14 +111,11 @@ inline LAYERSCH_ID operator++( LAYERSCH_ID& a )
/* Rotation, mirror of graphic items in components bodies are handled by a
* transform matrix. The default matrix is useful to draw lib entries with
* using this default matrix ( no rotation, no mirror but Y axis is bottom to top, and
- * Y draw axis is to to bottom so we must have a default matix that reverses
+ * Y draw axis is to to bottom so we must have a default matrix that reverses
* the Y coordinate and keeps the X coordiate
*/
extern TRANSFORM DefaultTransform;
-extern wxSize g_RepeatStep;
-extern int g_RepeatDeltaLabel;
-
/* First and main (root) screen */
extern SCH_SHEET* g_RootSheet;
diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp
index a65bc88b53..77181fdda4 100644
--- a/eeschema/libeditframe.cpp
+++ b/eeschema/libeditframe.cpp
@@ -194,6 +194,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_drawSpecificUnit = false;
m_HotkeysZoomAndGridList = g_Libedit_Hokeys_Descr;
m_editPinsPerPartOrConvert = false;
+ m_repeatPinStep = DEFAULT_REPEAT_OFFSET_PIN;
// Delayed initialization
if( m_textSize == -1 )
diff --git a/eeschema/libeditframe.h b/eeschema/libeditframe.h
index 233b77f031..84969ba381 100644
--- a/eeschema/libeditframe.h
+++ b/eeschema/libeditframe.h
@@ -119,6 +119,9 @@ class LIB_EDIT_FRAME : public SCH_BASE_FRAME
/// Default pin length
static int m_defaultPinLength;
+ /// Default repeat offset for pins in repeat place pin
+ int m_repeatPinStep;
+
static wxSize m_clientSize;
friend class DIALOG_LIB_EDIT_TEXT;
@@ -172,7 +175,20 @@ public:
/** Set the default pin len.
*/
- static void SetDefaultPinLength( int aLength ) { m_defaultPinLength = aLength; }
+ static void SetDefaultPinLength( int aLength ) { m_defaultPinLength = aLength; }
+
+ /**
+ * @return the increment value of the position of a pin
+ * for the pin repeat command
+ */
+ int GetRepeatPinStep() const { return m_repeatPinStep; }
+
+ /**
+ * Sets the repeat step value for pins repeat command
+ * @param aStep the increment value of the position of an item
+ * for the repeat command
+ */
+ void SetRepeatPinStep( int aStep) { m_repeatPinStep = aStep; }
void ReCreateMenuBar();
diff --git a/eeschema/pinedit.cpp b/eeschema/pinedit.cpp
index 58c706a6dc..3afaa089ee 100644
--- a/eeschema/pinedit.cpp
+++ b/eeschema/pinedit.cpp
@@ -46,7 +46,7 @@
#include
-extern void IncrementLabelMember( wxString& name );
+extern void IncrementLabelMember( wxString& name, int aIncrement );
static void AbortPinMove( EDA_DRAW_PANEL* Panel, wxDC* DC );
@@ -572,13 +572,34 @@ void LIB_EDIT_FRAME::RepeatPinItem( wxDC* DC, LIB_PIN* SourcePin )
pin->ClearFlags();
pin->SetFlags( IS_NEW );
- pin->Move( pin->GetPosition() + wxPoint( g_RepeatStep.x, -g_RepeatStep.y ) );
+ wxPoint step;
+
+ switch( pin->GetOrientation() )
+ {
+ case PIN_UP:
+ step.x = GetRepeatPinStep();
+ break;
+
+ case PIN_DOWN:
+ step.x = GetRepeatPinStep();
+ break;
+
+ case PIN_LEFT:
+ step.y = - GetRepeatPinStep();
+ break;
+
+ case PIN_RIGHT:
+ step.y = - GetRepeatPinStep();
+ break;
+ }
+
+ pin->Move( pin->GetPosition() + step );
wxString nextName = pin->GetName();
- IncrementLabelMember( nextName );
+ IncrementLabelMember( nextName, GetRepeatDeltaLabel() );
pin->SetName( nextName );
pin->PinStringNum( msg );
- IncrementLabelMember( msg );
+ IncrementLabelMember( msg, GetRepeatDeltaLabel() );
pin->SetPinNumFromString( msg );
m_drawItem = pin;
diff --git a/eeschema/sch_base_frame.cpp b/eeschema/sch_base_frame.cpp
index 672c0db17f..c57e1bc161 100644
--- a/eeschema/sch_base_frame.cpp
+++ b/eeschema/sch_base_frame.cpp
@@ -28,6 +28,9 @@
#include
#include
+// Sttaic members:
+
+
SCH_BASE_FRAME::SCH_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent,
FRAME_T aWindowType, const wxString& aTitle,
const wxPoint& aPosition, const wxSize& aSize, long aStyle,
@@ -35,10 +38,12 @@ SCH_BASE_FRAME::SCH_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent,
EDA_DRAW_FRAME( aKiway, aParent, aWindowType, aTitle, aPosition,
aSize, aStyle, aFrameName )
{
- m_zoomLevelCoeff = 11.0; // Adjusted to roughly displays zoom level = 1
+ m_zoomLevelCoeff = 11.0; // Adjusted to roughly displays zoom level = 1
// when the screen shows a 1:1 image
// obviously depends on the monitor,
// but this is an acceptable value
+ m_repeatStep = wxPoint( DEFAULT_REPEAT_OFFSET_X, DEFAULT_REPEAT_OFFSET_Y );
+ m_repeatDeltaLabel = DEFAULT_REPEAT_LABEL_INC;
}
diff --git a/eeschema/sch_base_frame.h b/eeschema/sch_base_frame.h
index 0998623bd9..c99e1a603e 100644
--- a/eeschema/sch_base_frame.h
+++ b/eeschema/sch_base_frame.h
@@ -47,6 +47,13 @@ class SCHLIB_FILTER;
*/
class SCH_BASE_FRAME : public EDA_DRAW_FRAME
{
+protected:
+ wxPoint m_repeatStep; ///< the increment value of the position of an item
+ ///< when it is repeated
+ int m_repeatDeltaLabel; ///< the increment value of labels like bus members
+ ///< when they are repeated
+
+
public:
SCH_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent,
FRAME_T aWindowType,
@@ -56,6 +63,33 @@ public:
SCH_SCREEN* GetScreen() const; // overload EDA_DRAW_FRAME
+ /**
+ * @return the increment value of the position of an item
+ * for the repeat command
+ */
+ const wxPoint GetRepeatStep() const { return m_repeatStep; }
+
+ /**
+ * Sets the repeat step value for repeat command
+ * @param aStep the increment value of the position of an item
+ * for the repeat command
+ */
+ void SetRepeatStep( const wxPoint& aStep) { m_repeatStep = aStep; }
+
+ /**
+ * @return the increment value of labels like bus members
+ * for the repeat command
+ */
+ int GetRepeatDeltaLabel() const { return m_repeatDeltaLabel; }
+
+ /**
+ * Sets the repeat delta label value for repeat command
+ * @param aDelta the increment value of labels like bus members
+ * for the repeat command
+ */
+ void SetRepeatDeltaLabel( int aDelta ) { m_repeatDeltaLabel = aDelta; }
+
+
/**
* Function GetZoomLevelIndicator
* returns a human readable value which can be displayed as zoom
diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp
index 12a99405ef..7422662ce7 100644
--- a/eeschema/sch_text.cpp
+++ b/eeschema/sch_text.cpp
@@ -46,7 +46,7 @@
#include
-extern void IncrementLabelMember( wxString& name );
+extern void IncrementLabelMember( wxString& name, int aIncrement );
/* Names of sheet label types. */
@@ -131,9 +131,9 @@ EDA_ITEM* SCH_TEXT::Clone() const
}
-void SCH_TEXT::IncrementLabel()
+void SCH_TEXT::IncrementLabel( int aIncrement )
{
- IncrementLabelMember( m_Text );
+ IncrementLabelMember( m_Text, aIncrement );
}
diff --git a/eeschema/sch_text.h b/eeschema/sch_text.h
index 6c068da39e..a570bfc57f 100644
--- a/eeschema/sch_text.h
+++ b/eeschema/sch_text.h
@@ -98,9 +98,11 @@ public:
/**
* Function IncrementLabel
- * increments the label text.
+ * increments the label text, if it ends with a number.
+ * @param aIncrement = the increment value to add to the number
+ * ending the text
*/
- void IncrementLabel();
+ void IncrementLabel( int aIncrement );
/**
* Function SetOrientation