Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
1ca89458
Commit
1ca89458
authored
Feb 02, 2012
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
put module text configuration variables into the BOARD
parent
2b3b2fc0
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
172 additions
and
172 deletions
+172
-172
class_board_design_settings.h
include/class_board_design_settings.h
+27
-21
class_board_design_settings.cpp
pcbnew/class_board_design_settings.cpp
+5
-0
dialog_graphic_items_options.cpp
pcbnew/dialogs/dialog_graphic_items_options.cpp
+8
-8
edgemod.cpp
pcbnew/edgemod.cpp
+26
-26
edtxtmod.cpp
pcbnew/edtxtmod.cpp
+16
-16
ioascii.cpp
pcbnew/ioascii.cpp
+7
-7
kicad_plugin.cpp
pcbnew/kicad_plugin.cpp
+48
-51
librairi.cpp
pcbnew/librairi.cpp
+31
-31
pcbnew.cpp
pcbnew/pcbnew.cpp
+0
-3
pcbnew.h
pcbnew/pcbnew.h
+0
-5
pcbnew_config.cpp
pcbnew/pcbnew_config.cpp
+4
-4
No files found.
include/class_board_design_settings.h
View file @
1ca89458
...
@@ -16,6 +16,7 @@ protected:
...
@@ -16,6 +16,7 @@ protected:
int
m_VisibleLayers
;
///< Bit-mask for layer visibility
int
m_VisibleLayers
;
///< Bit-mask for layer visibility
int
m_VisibleElements
;
///< Bit-mask for element category visibility
int
m_VisibleElements
;
///< Bit-mask for element category visibility
public
:
public
:
bool
m_MicroViasAllowed
;
///< true to allow micro vias
bool
m_MicroViasAllowed
;
///< true to allow micro vias
int
m_CurrentViaType
;
///< via type (VIA_BLIND_BURIED, VIA_TROUGHT VIA_MICROVIA)
int
m_CurrentViaType
;
///< via type (VIA_BLIND_BURIED, VIA_TROUGHT VIA_MICROVIA)
...
@@ -39,6 +40,11 @@ public:
...
@@ -39,6 +40,11 @@ public:
///< The final margin is the sum of these 2 values
///< The final margin is the sum of these 2 values
int
m_BoardThickness
;
///< Board Thickness for 3D viewer
int
m_BoardThickness
;
///< Board Thickness for 3D viewer
// Variables used in footprint handling
wxSize
m_ModuleTextSize
;
///< Default footprint texts size
int
m_ModuleTextWidth
;
int
m_ModuleSegmentWidth
;
public
:
public
:
BOARD_DESIGN_SETTINGS
();
BOARD_DESIGN_SETTINGS
();
...
...
pcbnew/class_board_design_settings.cpp
View file @
1ca89458
...
@@ -45,6 +45,11 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS()
...
@@ -45,6 +45,11 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS()
// The final margin is the sum of these 2 values
// The final margin is the sum of these 2 values
// Usually < 0 because the mask is smaller than pad
// Usually < 0 because the mask is smaller than pad
m_ModuleTextSize
=
wxSize
(
500
,
500
);
m_ModuleTextWidth
=
100
;
m_ModuleSegmentWidth
=
100
;
// Layer thickness for 3D viewer
// Layer thickness for 3D viewer
m_BoardThickness
=
(
int
)(
1.6
*
PCB_INTERNAL_UNIT
/
25.4
);
m_BoardThickness
=
(
int
)(
1.6
*
PCB_INTERNAL_UNIT
/
25.4
);
}
}
...
...
pcbnew/dialogs/dialog_graphic_items_options.cpp
View file @
1ca89458
...
@@ -86,20 +86,20 @@ void DIALOG_GRAPHIC_ITEMS_OPTIONS::initValues()
...
@@ -86,20 +86,20 @@ void DIALOG_GRAPHIC_ITEMS_OPTIONS::initValues()
/* Modules: Edges width */
/* Modules: Edges width */
AddUnitSymbol
(
*
m_EdgeModWidthTitle
);
AddUnitSymbol
(
*
m_EdgeModWidthTitle
);
PutValueInLocalUnits
(
*
m_OptModuleEdgesWidth
,
PutValueInLocalUnits
(
*
m_OptModuleEdgesWidth
,
g
_ModuleSegmentWidth
,
PCB_INTERNAL_UNIT
);
m_BrdSettings
.
m
_ModuleSegmentWidth
,
PCB_INTERNAL_UNIT
);
/* Modules: Texts: Size & width */
/* Modules: Texts: Size & width */
AddUnitSymbol
(
*
m_TextModWidthTitle
);
AddUnitSymbol
(
*
m_TextModWidthTitle
);
PutValueInLocalUnits
(
*
m_OptModuleTextWidth
,
PutValueInLocalUnits
(
*
m_OptModuleTextWidth
,
g
_ModuleTextWidth
,
PCB_INTERNAL_UNIT
);
m_BrdSettings
.
m
_ModuleTextWidth
,
PCB_INTERNAL_UNIT
);
AddUnitSymbol
(
*
m_TextModSizeVTitle
);
AddUnitSymbol
(
*
m_TextModSizeVTitle
);
PutValueInLocalUnits
(
*
m_OptModuleTextVSize
,
PutValueInLocalUnits
(
*
m_OptModuleTextVSize
,
g
_ModuleTextSize
.
y
,
PCB_INTERNAL_UNIT
);
m_BrdSettings
.
m
_ModuleTextSize
.
y
,
PCB_INTERNAL_UNIT
);
AddUnitSymbol
(
*
m_TextModSizeHTitle
);
AddUnitSymbol
(
*
m_TextModSizeHTitle
);
PutValueInLocalUnits
(
*
m_OptModuleTextHSize
,
PutValueInLocalUnits
(
*
m_OptModuleTextHSize
,
g
_ModuleTextSize
.
x
,
PCB_INTERNAL_UNIT
);
m_BrdSettings
.
m
_ModuleTextSize
.
x
,
PCB_INTERNAL_UNIT
);
AddUnitSymbol
(
*
m_DefaultPenSizeTitle
);
AddUnitSymbol
(
*
m_DefaultPenSizeTitle
);
PutValueInLocalUnits
(
*
m_DefaultPenSizeCtrl
,
PutValueInLocalUnits
(
*
m_DefaultPenSizeCtrl
,
...
@@ -122,13 +122,13 @@ void DIALOG_GRAPHIC_ITEMS_OPTIONS::OnOkClick( wxCommandEvent& event )
...
@@ -122,13 +122,13 @@ void DIALOG_GRAPHIC_ITEMS_OPTIONS::OnOkClick( wxCommandEvent& event )
m_Parent
->
GetBoard
()
->
SetDesignSettings
(
m_BrdSettings
);
m_Parent
->
GetBoard
()
->
SetDesignSettings
(
m_BrdSettings
);
g
_ModuleSegmentWidth
=
m_BrdSettings
.
m
_ModuleSegmentWidth
=
ReturnValueFromTextCtrl
(
*
m_OptModuleEdgesWidth
,
PCB_INTERNAL_UNIT
);
ReturnValueFromTextCtrl
(
*
m_OptModuleEdgesWidth
,
PCB_INTERNAL_UNIT
);
g
_ModuleTextWidth
=
m_BrdSettings
.
m
_ModuleTextWidth
=
ReturnValueFromTextCtrl
(
*
m_OptModuleTextWidth
,
PCB_INTERNAL_UNIT
);
ReturnValueFromTextCtrl
(
*
m_OptModuleTextWidth
,
PCB_INTERNAL_UNIT
);
g
_ModuleTextSize
.
y
=
m_BrdSettings
.
m
_ModuleTextSize
.
y
=
ReturnValueFromTextCtrl
(
*
m_OptModuleTextVSize
,
PCB_INTERNAL_UNIT
);
ReturnValueFromTextCtrl
(
*
m_OptModuleTextVSize
,
PCB_INTERNAL_UNIT
);
g
_ModuleTextSize
.
x
=
m_BrdSettings
.
m
_ModuleTextSize
.
x
=
ReturnValueFromTextCtrl
(
*
m_OptModuleTextHSize
,
PCB_INTERNAL_UNIT
);
ReturnValueFromTextCtrl
(
*
m_OptModuleTextHSize
,
PCB_INTERNAL_UNIT
);
g_DrawDefaultLineThickness
=
g_DrawDefaultLineThickness
=
...
...
pcbnew/edgemod.cpp
View file @
1ca89458
...
@@ -159,40 +159,40 @@ static void ShowNewEdgeModule( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
...
@@ -159,40 +159,40 @@ static void ShowNewEdgeModule( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
void
FOOTPRINT_EDIT_FRAME
::
Edit_Edge_Width
(
EDGE_MODULE
*
aEdge
)
void
FOOTPRINT_EDIT_FRAME
::
Edit_Edge_Width
(
EDGE_MODULE
*
aEdge
)
{
{
MODULE
*
M
odule
=
GetBoard
()
->
m_Modules
;
MODULE
*
m
odule
=
GetBoard
()
->
m_Modules
;
SaveCopyInUndoList
(
M
odule
,
UR_MODEDIT
);
SaveCopyInUndoList
(
m
odule
,
UR_MODEDIT
);
if
(
aEdge
==
NULL
)
if
(
aEdge
==
NULL
)
{
{
aEdge
=
(
EDGE_MODULE
*
)
(
BOARD_ITEM
*
)
M
odule
->
m_Drawings
;
aEdge
=
(
EDGE_MODULE
*
)
(
BOARD_ITEM
*
)
m
odule
->
m_Drawings
;
for
(
;
aEdge
!=
NULL
;
aEdge
=
aEdge
->
Next
()
)
for
(
;
aEdge
!=
NULL
;
aEdge
=
aEdge
->
Next
()
)
{
{
if
(
aEdge
->
Type
()
!=
PCB_MODULE_EDGE_T
)
if
(
aEdge
->
Type
()
!=
PCB_MODULE_EDGE_T
)
continue
;
continue
;
aEdge
->
SetWidth
(
g
_ModuleSegmentWidth
);
aEdge
->
SetWidth
(
GetBoard
()
->
GetDesignSettings
().
m
_ModuleSegmentWidth
);
}
}
}
}
else
else
{
{
aEdge
->
SetWidth
(
g
_ModuleSegmentWidth
);
aEdge
->
SetWidth
(
GetBoard
()
->
GetDesignSettings
().
m
_ModuleSegmentWidth
);
}
}
OnModify
();
OnModify
();
M
odule
->
CalculateBoundingBox
();
m
odule
->
CalculateBoundingBox
();
M
odule
->
m_LastEdit_Time
=
time
(
NULL
);
m
odule
->
m_LastEdit_Time
=
time
(
NULL
);
}
}
void
FOOTPRINT_EDIT_FRAME
::
Edit_Edge_Layer
(
EDGE_MODULE
*
Edge
)
void
FOOTPRINT_EDIT_FRAME
::
Edit_Edge_Layer
(
EDGE_MODULE
*
a
Edge
)
{
{
MODULE
*
M
odule
=
GetBoard
()
->
m_Modules
;
MODULE
*
m
odule
=
GetBoard
()
->
m_Modules
;
int
new_layer
=
SILKSCREEN_N_FRONT
;
int
new_layer
=
SILKSCREEN_N_FRONT
;
if
(
Edge
!=
NULL
)
if
(
aEdge
)
new_layer
=
Edge
->
GetLayer
();
new_layer
=
a
Edge
->
GetLayer
();
/* Ask for the new layer */
/* Ask for the new layer */
new_layer
=
SelectLayer
(
new_layer
,
FIRST_COPPER_LAYER
,
LAST_NO_COPPER_LAYER
);
new_layer
=
SelectLayer
(
new_layer
,
FIRST_COPPER_LAYER
,
LAST_NO_COPPER_LAYER
);
...
@@ -209,28 +209,28 @@ void FOOTPRINT_EDIT_FRAME::Edit_Edge_Layer( EDGE_MODULE* Edge )
...
@@ -209,28 +209,28 @@ void FOOTPRINT_EDIT_FRAME::Edit_Edge_Layer( EDGE_MODULE* Edge )
return
;
return
;
}
}
SaveCopyInUndoList
(
M
odule
,
UR_MODEDIT
);
SaveCopyInUndoList
(
m
odule
,
UR_MODEDIT
);
if
(
Edge
==
NULL
)
if
(
a
Edge
==
NULL
)
{
{
Edge
=
(
EDGE_MODULE
*
)
(
BOARD_ITEM
*
)
M
odule
->
m_Drawings
;
aEdge
=
(
EDGE_MODULE
*
)
(
BOARD_ITEM
*
)
m
odule
->
m_Drawings
;
for
(
;
Edge
!=
NULL
;
Edge
=
Edge
->
Next
()
)
for
(
;
aEdge
!=
NULL
;
aEdge
=
a
Edge
->
Next
()
)
{
{
if
(
Edge
->
Type
()
!=
PCB_MODULE_EDGE_T
)
if
(
a
Edge
->
Type
()
!=
PCB_MODULE_EDGE_T
)
continue
;
continue
;
Edge
->
SetLayer
(
new_layer
);
a
Edge
->
SetLayer
(
new_layer
);
}
}
}
}
else
else
{
{
Edge
->
SetLayer
(
new_layer
);
a
Edge
->
SetLayer
(
new_layer
);
}
}
OnModify
();
OnModify
();
M
odule
->
CalculateBoundingBox
();
m
odule
->
CalculateBoundingBox
();
M
odule
->
m_LastEdit_Time
=
time
(
NULL
);
m
odule
->
m_LastEdit_Time
=
time
(
NULL
);
}
}
...
@@ -238,7 +238,7 @@ void FOOTPRINT_EDIT_FRAME::Enter_Edge_Width( EDGE_MODULE* aEdge )
...
@@ -238,7 +238,7 @@ void FOOTPRINT_EDIT_FRAME::Enter_Edge_Width( EDGE_MODULE* aEdge )
{
{
wxString
buffer
;
wxString
buffer
;
buffer
=
ReturnStringFromValue
(
g_UserUnit
,
g
_ModuleSegmentWidth
,
buffer
=
ReturnStringFromValue
(
g_UserUnit
,
GetBoard
()
->
GetDesignSettings
().
m
_ModuleSegmentWidth
,
GetScreen
()
->
GetInternalUnits
()
);
GetScreen
()
->
GetInternalUnits
()
);
wxTextEntryDialog
dlg
(
this
,
_
(
"New Width:"
),
_
(
"Edge Width"
),
buffer
);
wxTextEntryDialog
dlg
(
this
,
_
(
"New Width:"
),
_
(
"Edge Width"
),
buffer
);
...
@@ -246,13 +246,13 @@ void FOOTPRINT_EDIT_FRAME::Enter_Edge_Width( EDGE_MODULE* aEdge )
...
@@ -246,13 +246,13 @@ void FOOTPRINT_EDIT_FRAME::Enter_Edge_Width( EDGE_MODULE* aEdge )
return
;
// canceled by user
return
;
// canceled by user
buffer
=
dlg
.
GetValue
(
);
buffer
=
dlg
.
GetValue
(
);
g_ModuleSegmentWidth
=
ReturnValueFromString
(
g_UserUnit
,
buffer
,
GetBoard
()
->
GetDesignSettings
().
m_ModuleSegmentWidth
=
GetScreen
()
->
GetInternalUnits
()
);
ReturnValueFromString
(
g_UserUnit
,
buffer
,
GetScreen
()
->
GetInternalUnits
()
);
if
(
aEdge
)
if
(
aEdge
)
{
{
MODULE
*
module
=
GetBoard
()
->
m_Modules
;
MODULE
*
module
=
GetBoard
()
->
m_Modules
;
aEdge
->
SetWidth
(
g
_ModuleSegmentWidth
);
aEdge
->
SetWidth
(
GetBoard
()
->
GetDesignSettings
().
m
_ModuleSegmentWidth
);
module
->
CalculateBoundingBox
();
module
->
CalculateBoundingBox
();
OnModify
();
OnModify
();
}
}
...
@@ -337,7 +337,7 @@ EDGE_MODULE* FOOTPRINT_EDIT_FRAME::Begin_Edge_Module( EDGE_MODULE* Edge,
...
@@ -337,7 +337,7 @@ EDGE_MODULE* FOOTPRINT_EDIT_FRAME::Begin_Edge_Module( EDGE_MODULE* Edge,
if
(
Edge
->
GetShape
()
==
S_ARC
)
if
(
Edge
->
GetShape
()
==
S_ARC
)
Edge
->
SetAngle
(
ArcValue
);
Edge
->
SetAngle
(
ArcValue
);
Edge
->
SetWidth
(
g
_ModuleSegmentWidth
);
Edge
->
SetWidth
(
GetBoard
()
->
GetDesignSettings
().
m
_ModuleSegmentWidth
);
Edge
->
SetLayer
(
module
->
GetLayer
()
);
Edge
->
SetLayer
(
module
->
GetLayer
()
);
if
(
module
->
GetLayer
()
==
LAYER_N_FRONT
)
if
(
module
->
GetLayer
()
==
LAYER_N_FRONT
)
...
@@ -383,7 +383,7 @@ EDGE_MODULE* FOOTPRINT_EDIT_FRAME::Begin_Edge_Module( EDGE_MODULE* Edge,
...
@@ -383,7 +383,7 @@ EDGE_MODULE* FOOTPRINT_EDIT_FRAME::Begin_Edge_Module( EDGE_MODULE* Edge,
Edge
=
newedge
;
// point now new item
Edge
=
newedge
;
// point now new item
Edge
->
SetFlags
(
IS_NEW
);
Edge
->
SetFlags
(
IS_NEW
);
Edge
->
SetWidth
(
g
_ModuleSegmentWidth
);
Edge
->
SetWidth
(
GetBoard
()
->
GetDesignSettings
().
m
_ModuleSegmentWidth
);
Edge
->
SetStart
(
GetScreen
()
->
GetCrossHairPosition
()
);
Edge
->
SetStart
(
GetScreen
()
->
GetCrossHairPosition
()
);
Edge
->
SetEnd
(
Edge
->
GetStart
()
);
Edge
->
SetEnd
(
Edge
->
GetStart
()
);
...
...
pcbnew/edtxtmod.cpp
View file @
1ca89458
...
@@ -76,10 +76,10 @@ TEXTE_MODULE* PCB_BASE_FRAME::CreateTextModule( MODULE* Module, wxDC* DC )
...
@@ -76,10 +76,10 @@ TEXTE_MODULE* PCB_BASE_FRAME::CreateTextModule( MODULE* Module, wxDC* DC )
Text
->
m_Text
=
wxT
(
"text"
);
Text
->
m_Text
=
wxT
(
"text"
);
g_ModuleTextWidth
=
Clamp_Text_PenSize
(
g
_ModuleTextWidth
,
GetBoard
()
->
GetDesignSettings
().
m_ModuleTextWidth
=
Clamp_Text_PenSize
(
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextWidth
,
MIN
(
g_ModuleTextSize
.
x
,
g
_ModuleTextSize
.
y
),
true
);
MIN
(
GetBoard
()
->
GetDesignSettings
().
m_ModuleTextSize
.
x
,
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextSize
.
y
),
true
);
Text
->
m_Size
=
g
_ModuleTextSize
;
Text
->
m_Size
=
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextSize
;
Text
->
m_Thickness
=
g
_ModuleTextWidth
;
Text
->
m_Thickness
=
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextWidth
;
Text
->
m_Pos
=
GetScreen
()
->
GetCrossHairPosition
();
Text
->
m_Pos
=
GetScreen
()
->
GetCrossHairPosition
();
Text
->
SetLocalCoord
();
Text
->
SetLocalCoord
();
...
@@ -316,8 +316,8 @@ void PCB_BASE_FRAME::ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC )
...
@@ -316,8 +316,8 @@ void PCB_BASE_FRAME::ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC )
break
;
break
;
case
PCB_MODULE_TEXT_T
:
case
PCB_MODULE_TEXT_T
:
newSize
=
g
_ModuleTextSize
;
newSize
=
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextSize
;
newThickness
=
g
_ModuleTextWidth
;
newThickness
=
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextWidth
;
moduleText
=
(
TEXTE_MODULE
*
)
aItem
;
moduleText
=
(
TEXTE_MODULE
*
)
aItem
;
text
=
(
EDA_TEXT
*
)
moduleText
;
text
=
(
EDA_TEXT
*
)
moduleText
;
break
;
break
;
...
@@ -380,7 +380,7 @@ void PCB_BASE_FRAME::ResetModuleTextSizes( int aType, wxDC* aDC )
...
@@ -380,7 +380,7 @@ void PCB_BASE_FRAME::ResetModuleTextSizes( int aType, wxDC* aDC )
case
TEXT_is_REFERENCE
:
case
TEXT_is_REFERENCE
:
item
=
module
->
m_Reference
;
item
=
module
->
m_Reference
;
if
(
item
->
GetSize
()
!=
g_ModuleTextSize
||
item
->
GetThickness
()
!=
g
_ModuleTextWidth
)
if
(
item
->
GetSize
()
!=
GetBoard
()
->
GetDesignSettings
().
m_ModuleTextSize
||
item
->
GetThickness
()
!=
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextWidth
)
undoItemList
.
PushItem
(
itemWrapper
);
undoItemList
.
PushItem
(
itemWrapper
);
break
;
break
;
...
@@ -388,7 +388,7 @@ void PCB_BASE_FRAME::ResetModuleTextSizes( int aType, wxDC* aDC )
...
@@ -388,7 +388,7 @@ void PCB_BASE_FRAME::ResetModuleTextSizes( int aType, wxDC* aDC )
case
TEXT_is_VALUE
:
case
TEXT_is_VALUE
:
item
=
module
->
m_Value
;
item
=
module
->
m_Value
;
if
(
item
->
GetSize
()
!=
g_ModuleTextSize
||
item
->
GetThickness
()
!=
g
_ModuleTextWidth
)
if
(
item
->
GetSize
()
!=
GetBoard
()
->
GetDesignSettings
().
m_ModuleTextSize
||
item
->
GetThickness
()
!=
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextWidth
)
undoItemList
.
PushItem
(
itemWrapper
);
undoItemList
.
PushItem
(
itemWrapper
);
break
;
break
;
...
@@ -401,8 +401,8 @@ void PCB_BASE_FRAME::ResetModuleTextSizes( int aType, wxDC* aDC )
...
@@ -401,8 +401,8 @@ void PCB_BASE_FRAME::ResetModuleTextSizes( int aType, wxDC* aDC )
{
{
item
=
(
TEXTE_MODULE
*
)
boardItem
;
item
=
(
TEXTE_MODULE
*
)
boardItem
;
if
(
item
->
GetSize
()
!=
g
_ModuleTextSize
if
(
item
->
GetSize
()
!=
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextSize
||
item
->
GetThickness
()
!=
g
_ModuleTextWidth
)
||
item
->
GetThickness
()
!=
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextWidth
)
{
{
undoItemList
.
PushItem
(
itemWrapper
);
undoItemList
.
PushItem
(
itemWrapper
);
break
;
break
;
...
@@ -432,13 +432,13 @@ void PCB_BASE_FRAME::ResetModuleTextSizes( int aType, wxDC* aDC )
...
@@ -432,13 +432,13 @@ void PCB_BASE_FRAME::ResetModuleTextSizes( int aType, wxDC* aDC )
switch
(
aType
)
switch
(
aType
)
{
{
case
TEXT_is_REFERENCE
:
case
TEXT_is_REFERENCE
:
module
->
m_Reference
->
SetThickness
(
g
_ModuleTextWidth
);
module
->
m_Reference
->
SetThickness
(
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextWidth
);
module
->
m_Reference
->
SetSize
(
g
_ModuleTextSize
);
module
->
m_Reference
->
SetSize
(
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextSize
);
break
;
break
;
case
TEXT_is_VALUE
:
case
TEXT_is_VALUE
:
module
->
m_Value
->
SetThickness
(
g
_ModuleTextWidth
);
module
->
m_Value
->
SetThickness
(
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextWidth
);
module
->
m_Value
->
SetSize
(
g
_ModuleTextSize
);
module
->
m_Value
->
SetSize
(
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextSize
);
break
;
break
;
case
TEXT_is_DIVERS
:
case
TEXT_is_DIVERS
:
...
@@ -447,8 +447,8 @@ void PCB_BASE_FRAME::ResetModuleTextSizes( int aType, wxDC* aDC )
...
@@ -447,8 +447,8 @@ void PCB_BASE_FRAME::ResetModuleTextSizes( int aType, wxDC* aDC )
if
(
boardItem
->
Type
()
==
PCB_MODULE_TEXT_T
)
if
(
boardItem
->
Type
()
==
PCB_MODULE_TEXT_T
)
{
{
item
=
(
TEXTE_MODULE
*
)
boardItem
;
item
=
(
TEXTE_MODULE
*
)
boardItem
;
item
->
SetThickness
(
g
_ModuleTextWidth
);
item
->
SetThickness
(
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextWidth
);
item
->
SetSize
(
g
_ModuleTextSize
);
item
->
SetSize
(
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextSize
);
}
}
}
}
...
...
pcbnew/ioascii.cpp
View file @
1ca89458
...
@@ -563,21 +563,21 @@ int PCB_BASE_FRAME::ReadSetup( LINE_READER* aReader )
...
@@ -563,21 +563,21 @@ int PCB_BASE_FRAME::ReadSetup( LINE_READER* aReader )
if
(
stricmp
(
line
,
"EdgeModWidth"
)
==
0
)
if
(
stricmp
(
line
,
"EdgeModWidth"
)
==
0
)
{
{
g
_ModuleSegmentWidth
=
atoi
(
data
);
GetBoard
()
->
GetDesignSettings
().
m
_ModuleSegmentWidth
=
atoi
(
data
);
continue
;
continue
;
}
}
if
(
stricmp
(
line
,
"TextModWidth"
)
==
0
)
if
(
stricmp
(
line
,
"TextModWidth"
)
==
0
)
{
{
g
_ModuleTextWidth
=
atoi
(
data
);
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextWidth
=
atoi
(
data
);
continue
;
continue
;
}
}
if
(
stricmp
(
line
,
"TextModSize"
)
==
0
)
if
(
stricmp
(
line
,
"TextModSize"
)
==
0
)
{
{
g
_ModuleTextSize
.
x
=
atoi
(
data
);
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextSize
.
x
=
atoi
(
data
);
data
=
strtok
(
NULL
,
delims
);
data
=
strtok
(
NULL
,
delims
);
g
_ModuleTextSize
.
y
=
atoi
(
data
);
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextSize
.
y
=
atoi
(
data
);
continue
;
continue
;
}
}
...
@@ -735,9 +735,9 @@ static int WriteSetup( FILE* aFile, PCB_EDIT_FRAME* aFrame, BOARD* aBoard )
...
@@ -735,9 +735,9 @@ static int WriteSetup( FILE* aFile, PCB_EDIT_FRAME* aFrame, BOARD* aBoard )
aBoard
->
GetDesignSettings
().
m_PcbTextSize
.
x
,
aBoard
->
GetDesignSettings
().
m_PcbTextSize
.
x
,
aBoard
->
GetDesignSettings
().
m_PcbTextSize
.
y
);
aBoard
->
GetDesignSettings
().
m_PcbTextSize
.
y
);
fprintf
(
aFile
,
"EdgeModWidth %d
\n
"
,
g
_ModuleSegmentWidth
);
fprintf
(
aFile
,
"EdgeModWidth %d
\n
"
,
aBoard
->
GetDesignSettings
().
m
_ModuleSegmentWidth
);
fprintf
(
aFile
,
"TextModSize %d %d
\n
"
,
g_ModuleTextSize
.
x
,
g
_ModuleTextSize
.
y
);
fprintf
(
aFile
,
"TextModSize %d %d
\n
"
,
aBoard
->
GetDesignSettings
().
m_ModuleTextSize
.
x
,
aBoard
->
GetDesignSettings
().
m
_ModuleTextSize
.
y
);
fprintf
(
aFile
,
"TextModWidth %d
\n
"
,
g
_ModuleTextWidth
);
fprintf
(
aFile
,
"TextModWidth %d
\n
"
,
aBoard
->
GetDesignSettings
().
m
_ModuleTextWidth
);
fprintf
(
aFile
,
"PadSize %d %d
\n
"
,
g_Pad_Master
.
m_Size
.
x
,
g_Pad_Master
.
m_Size
.
y
);
fprintf
(
aFile
,
"PadSize %d %d
\n
"
,
g_Pad_Master
.
m_Size
.
x
,
g_Pad_Master
.
m_Size
.
y
);
fprintf
(
aFile
,
"PadDrill %d
\n
"
,
g_Pad_Master
.
m_Drill
.
x
);
fprintf
(
aFile
,
"PadDrill %d
\n
"
,
g_Pad_Master
.
m_Drill
.
x
);
fprintf
(
aFile
,
fprintf
(
aFile
,
...
...
pcbnew/kicad_plugin.cpp
View file @
1ca89458
This diff is collapsed.
Click to expand it.
pcbnew/librairi.cpp
View file @
1ca89458
...
@@ -87,7 +87,7 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module()
...
@@ -87,7 +87,7 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module()
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
SetLocaleTo_C_standard
();
SetLocaleTo_C_standard
();
/
* Read header and test file type */
/
/ Read header and test file type
reader
.
ReadLine
();
reader
.
ReadLine
();
Line
=
reader
.
Line
();
Line
=
reader
.
Line
();
...
@@ -104,7 +104,7 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module()
...
@@ -104,7 +104,7 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module()
}
}
}
}
/
* Read file: Search the description starting line (skip lib header)*/
/
/ Read file: Search the description starting line (skip lib header)
if
(
!
Footprint_Is_GPCB_Format
)
if
(
!
Footprint_Is_GPCB_Format
)
{
{
while
(
reader
.
ReadLine
()
)
while
(
reader
.
ReadLine
()
)
...
@@ -127,10 +127,10 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module()
...
@@ -127,10 +127,10 @@ MODULE* FOOTPRINT_EDIT_FRAME::Import_Module()
SetLocaleTo_Default
();
// revert to the current locale
SetLocaleTo_Default
();
// revert to the current locale
/
* Insert footprint in list*/
/
/ Insert footprint in list
GetBoard
()
->
Add
(
module
);
GetBoard
()
->
Add
(
module
);
/
* Display info : */
/
/ Display info :
module
->
DisplayInfo
(
this
);
module
->
DisplayInfo
(
this
);
PlaceModule
(
module
,
NULL
);
PlaceModule
(
module
,
NULL
);
GetBoard
()
->
m_Status_Pcb
=
0
;
GetBoard
()
->
m_Status_Pcb
=
0
;
...
@@ -216,7 +216,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
...
@@ -216,7 +216,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
if
(
CmpName
==
wxEmptyString
)
if
(
CmpName
==
wxEmptyString
)
return
;
return
;
/
* Confirmation */
/
/ Confirmation
msg
.
Printf
(
_
(
"Ok to delete module %s in library %s"
),
msg
.
Printf
(
_
(
"Ok to delete module %s in library %s"
),
GetChars
(
CmpName
),
GetChars
(
aLibname
)
);
GetChars
(
CmpName
),
GetChars
(
aLibname
)
);
...
@@ -236,7 +236,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
...
@@ -236,7 +236,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
FOOTPRINT_LIBRARY
input_lib
(
lib_module
);
FOOTPRINT_LIBRARY
input_lib
(
lib_module
);
/
* Read header. */
/
/ Read header.
if
(
!
input_lib
.
IsLibrary
()
)
if
(
!
input_lib
.
IsLibrary
()
)
{
{
fclose
(
lib_module
);
fclose
(
lib_module
);
...
@@ -247,7 +247,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
...
@@ -247,7 +247,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
return
;
return
;
}
}
/
* Read module names. */
/
/ Read module names.
input_lib
.
RebuildIndex
();
input_lib
.
RebuildIndex
();
bool
found
=
input_lib
.
FindInList
(
CmpName
);
bool
found
=
input_lib
.
FindInList
(
CmpName
);
...
@@ -259,7 +259,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
...
@@ -259,7 +259,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
return
;
return
;
}
}
/
* Create new library. */
/
/ Create new library.
newFileName
=
oldFileName
;
newFileName
=
oldFileName
;
newFileName
.
SetExt
(
FILETMP_EXT
);
newFileName
.
SetExt
(
FILETMP_EXT
);
...
@@ -281,7 +281,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
...
@@ -281,7 +281,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
output_lib
.
SortList
();
output_lib
.
SortList
();
output_lib
.
WriteSectionIndex
();
output_lib
.
WriteSectionIndex
();
/
* Copy modules. */
/
/ Copy modules.
rewind
(
lib_module
);
rewind
(
lib_module
);
LineNum
=
input_lib
.
m_LineNum
;
LineNum
=
input_lib
.
m_LineNum
;
...
@@ -298,7 +298,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
...
@@ -298,7 +298,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
if
(
msg
.
CmpNoCase
(
CmpName
)
==
0
)
if
(
msg
.
CmpNoCase
(
CmpName
)
==
0
)
{
{
/
* Delete old module (i.e. do not copy description to out_file). */
/
/ Delete old module (i.e. do not copy description to out_file).
while
(
GetLine
(
lib_module
,
Line
,
&
LineNum
)
)
while
(
GetLine
(
lib_module
,
Line
,
&
LineNum
)
)
{
{
if
(
strnicmp
(
Line
,
"$EndMODULE"
,
9
)
==
0
)
if
(
strnicmp
(
Line
,
"$EndMODULE"
,
9
)
==
0
)
...
@@ -318,7 +318,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
...
@@ -318,7 +318,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
wxEndBusyCursor
();
wxEndBusyCursor
();
/
* The old library file is renamed .bak */
/
/ The old library file is renamed .bak
wxFileName
backupFileName
=
oldFileName
;
wxFileName
backupFileName
=
oldFileName
;
backupFileName
.
SetExt
(
BACKUP_EXT
);
backupFileName
.
SetExt
(
BACKUP_EXT
);
...
@@ -333,7 +333,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
...
@@ -333,7 +333,7 @@ void FOOTPRINT_EDIT_FRAME::Delete_Module_In_Library( const wxString& aLibname )
return
;
return
;
}
}
/
* The temporary file is renamed as the previous library. */
/
/ The temporary file is renamed as the previous library.
if
(
!
wxRenameFile
(
newFileName
.
GetFullPath
(),
oldFileName
.
GetFullPath
()
)
)
if
(
!
wxRenameFile
(
newFileName
.
GetFullPath
(),
oldFileName
.
GetFullPath
()
)
)
{
{
msg
.
Printf
(
_
(
"Could not create temporary library file <%s>."
),
msg
.
Printf
(
_
(
"Could not create temporary library file <%s>."
),
...
@@ -435,7 +435,7 @@ void PCB_EDIT_FRAME::ArchiveModulesOnBoard( const wxString& aLibName, bool aNewM
...
@@ -435,7 +435,7 @@ void PCB_EDIT_FRAME::ArchiveModulesOnBoard( const wxString& aLibName, bool aNewM
if
(
!
success
)
if
(
!
success
)
break
;
break
;
/
* Check for request to stop backup (ESCAPE key actuated) */
/
/ Check for request to stop backup (ESCAPE key actuated)
if
(
m_canvas
->
GetAbortRequest
()
)
if
(
m_canvas
->
GetAbortRequest
()
)
break
;
break
;
}
}
...
@@ -472,7 +472,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
...
@@ -472,7 +472,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
if
(
!
IsWritable
(
newFileName
)
)
if
(
!
IsWritable
(
newFileName
)
)
return
false
;
return
false
;
/
* Ask for the footprint name in lib */
/
/ Ask for the footprint name in lib
Name_Cmp
=
aModule
->
m_LibRef
;
Name_Cmp
=
aModule
->
m_LibRef
;
if
(
aDisplayDialog
)
if
(
aDisplayDialog
)
...
@@ -506,7 +506,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
...
@@ -506,7 +506,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
return
false
;
return
false
;
}
}
/
* Read library file */
/
/ Read library file
FOOTPRINT_LIBRARY
input_lib
(
lib_module
);
FOOTPRINT_LIBRARY
input_lib
(
lib_module
);
if
(
!
input_lib
.
IsLibrary
()
)
if
(
!
input_lib
.
IsLibrary
()
)
...
@@ -517,7 +517,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
...
@@ -517,7 +517,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
return
false
;
return
false
;
}
}
/
* Read footprints in lib: - search for an existing footprint */
/
/ Read footprints in lib: - search for an existing footprint
input_lib
.
RebuildIndex
();
input_lib
.
RebuildIndex
();
bool
module_exists
=
input_lib
.
FindInList
(
Name_Cmp
);
bool
module_exists
=
input_lib
.
FindInList
(
Name_Cmp
);
...
@@ -538,7 +538,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
...
@@ -538,7 +538,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
}
}
}
}
/
* Creates the new library */
/
/ Creates the new library
newFileName
.
SetExt
(
FILETMP_EXT
);
newFileName
.
SetExt
(
FILETMP_EXT
);
...
@@ -563,7 +563,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
...
@@ -563,7 +563,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
output_lib
.
SortList
();
output_lib
.
SortList
();
/
* Create the library header with a new date */
/
/ Create the library header with a new date
output_lib
.
WriteHeader
();
output_lib
.
WriteHeader
();
output_lib
.
WriteSectionIndex
();
output_lib
.
WriteSectionIndex
();
...
@@ -595,7 +595,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
...
@@ -595,7 +595,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
if
(
msg
.
CmpNoCase
(
Name_Cmp
)
==
0
)
if
(
msg
.
CmpNoCase
(
Name_Cmp
)
==
0
)
{
{
/
* skip old footprint descr (delete from the lib) */
/
/ skip old footprint descr (delete from the lib)
while
(
GetLine
(
lib_module
,
Line
,
&
LineNum
)
)
while
(
GetLine
(
lib_module
,
Line
,
&
LineNum
)
)
{
{
if
(
strnicmp
(
Line
,
"$EndMODULE"
,
9
)
==
0
)
if
(
strnicmp
(
Line
,
"$EndMODULE"
,
9
)
==
0
)
...
@@ -609,7 +609,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
...
@@ -609,7 +609,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
fprintf
(
dest
,
"%s
\n
"
,
Line
);
fprintf
(
dest
,
"%s
\n
"
,
Line
);
}
}
/
* Write the new footprint ( append it to the list of footprint ) */
/
/ Write the new footprint ( append it to the list of footprint )
tmp
=
aModule
->
GetTimeStamp
();
tmp
=
aModule
->
GetTimeStamp
();
aModule
->
SetTimeStamp
(
0
);
aModule
->
SetTimeStamp
(
0
);
aModule
->
Save
(
dest
);
aModule
->
Save
(
dest
);
...
@@ -623,7 +623,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
...
@@ -623,7 +623,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
wxEndBusyCursor
();
wxEndBusyCursor
();
/
* The old library file is renamed .bak */
/
/ The old library file is renamed .bak
oldFileName
=
aLibName
;
oldFileName
=
aLibName
;
oldFileName
.
SetExt
(
BACKUP_EXT
);
oldFileName
.
SetExt
(
BACKUP_EXT
);
...
@@ -637,7 +637,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
...
@@ -637,7 +637,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
DisplayError
(
this
,
msg
);
DisplayError
(
this
,
msg
);
}
}
/
* The new library file is renamed */
/
/ The new library file is renamed
if
(
!
wxRenameFile
(
newFileName
.
GetFullPath
(),
aLibName
)
)
if
(
!
wxRenameFile
(
newFileName
.
GetFullPath
(),
aLibName
)
)
{
{
msg
.
Printf
(
_
(
"Could not create temporary library file <%s>."
),
msg
.
Printf
(
_
(
"Could not create temporary library file <%s>."
),
...
@@ -667,7 +667,7 @@ MODULE* PCB_BASE_FRAME::Create_1_Module( const wxString& aModuleName )
...
@@ -667,7 +667,7 @@ MODULE* PCB_BASE_FRAME::Create_1_Module( const wxString& aModuleName )
moduleName
=
aModuleName
;
moduleName
=
aModuleName
;
/
* Ask for the new module reference */
/
/ Ask for the new module reference
if
(
moduleName
.
IsEmpty
()
)
if
(
moduleName
.
IsEmpty
()
)
{
{
wxTextEntryDialog
dlg
(
this
,
_
(
"Module Reference:"
),
wxTextEntryDialog
dlg
(
this
,
_
(
"Module Reference:"
),
...
@@ -693,23 +693,23 @@ MODULE* PCB_BASE_FRAME::Create_1_Module( const wxString& aModuleName )
...
@@ -693,23 +693,23 @@ MODULE* PCB_BASE_FRAME::Create_1_Module( const wxString& aModuleName )
GetBoard
()
->
Add
(
Module
);
GetBoard
()
->
Add
(
Module
);
/
* Update parameters: position, timestamp ... */
/
/ Update parameters: position, timestamp ...
newpos
=
GetScreen
()
->
GetCrossHairPosition
();
newpos
=
GetScreen
()
->
GetCrossHairPosition
();
Module
->
SetPosition
(
newpos
);
Module
->
SetPosition
(
newpos
);
Module
->
m_LastEdit_Time
=
time
(
NULL
);
Module
->
m_LastEdit_Time
=
time
(
NULL
);
/
* Update its name in lib */
/
/ Update its name in lib
Module
->
m_LibRef
=
moduleName
;
Module
->
m_LibRef
=
moduleName
;
/
* Update reference: */
/
/ Update reference:
Module
->
m_Reference
->
m_Text
=
moduleName
;
Module
->
m_Reference
->
m_Text
=
moduleName
;
Module
->
m_Reference
->
SetThickness
(
g
_ModuleTextWidth
);
Module
->
m_Reference
->
SetThickness
(
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextWidth
);
Module
->
m_Reference
->
SetSize
(
g
_ModuleTextSize
);
Module
->
m_Reference
->
SetSize
(
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextSize
);
/
* Set the value field to a default value */
/
/ Set the value field to a default value
Module
->
m_Value
->
m_Text
=
wxT
(
"VAL**"
);
Module
->
m_Value
->
m_Text
=
wxT
(
"VAL**"
);
Module
->
m_Value
->
SetThickness
(
g
_ModuleTextWidth
);
Module
->
m_Value
->
SetThickness
(
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextWidth
);
Module
->
m_Value
->
SetSize
(
g
_ModuleTextSize
);
Module
->
m_Value
->
SetSize
(
GetBoard
()
->
GetDesignSettings
().
m
_ModuleTextSize
);
Module
->
SetPosition
(
wxPoint
(
0
,
0
)
);
Module
->
SetPosition
(
wxPoint
(
0
,
0
)
);
...
...
pcbnew/pcbnew.cpp
View file @
1ca89458
...
@@ -64,9 +64,6 @@ bool g_Track_45_Only_Allowed = true; // True to allow horiz, vert. an
...
@@ -64,9 +64,6 @@ bool g_Track_45_Only_Allowed = true; // True to allow horiz, vert. an
bool
Segments_45_Only
;
// True to allow horiz, vert. and 45deg only graphic segments
bool
Segments_45_Only
;
// True to allow horiz, vert. and 45deg only graphic segments
bool
g_TwoSegmentTrackBuild
=
true
;
bool
g_TwoSegmentTrackBuild
=
true
;
wxSize
g_ModuleTextSize
;
/* Default footprint texts size */
int
g_ModuleSegmentWidth
;
int
g_ModuleTextWidth
;
int
Route_Layer_TOP
;
int
Route_Layer_TOP
;
int
Route_Layer_BOTTOM
;
int
Route_Layer_BOTTOM
;
int
g_MaxLinksShowed
;
int
g_MaxLinksShowed
;
...
...
pcbnew/pcbnew.h
View file @
1ca89458
...
@@ -57,11 +57,6 @@ extern bool Segments_45_Only;
...
@@ -57,11 +57,6 @@ extern bool Segments_45_Only;
extern
wxString
g_Shapes3DExtBuffer
;
extern
wxString
g_Shapes3DExtBuffer
;
extern
wxString
g_DocModulesFileName
;
extern
wxString
g_DocModulesFileName
;
/* Variables used in footprint handling */
extern
wxSize
g_ModuleTextSize
;
/* Default footprint texts size */
extern
int
g_ModuleTextWidth
;
extern
int
g_ModuleSegmentWidth
;
/* Layer pair for auto routing and switch layers by hotkey */
/* Layer pair for auto routing and switch layers by hotkey */
extern
int
Route_Layer_TOP
;
extern
int
Route_Layer_TOP
;
extern
int
Route_Layer_BOTTOM
;
extern
int
Route_Layer_BOTTOM
;
...
...
pcbnew/pcbnew_config.cpp
View file @
1ca89458
...
@@ -236,11 +236,11 @@ PARAM_CFG_ARRAY PCB_EDIT_FRAME::GetProjectFileParameters()
...
@@ -236,11 +236,11 @@ PARAM_CFG_ARRAY PCB_EDIT_FRAME::GetProjectFileParameters()
&
bds
.
m_PcbTextSize
.
x
,
&
bds
.
m_PcbTextSize
.
x
,
600
,
TEXTS_MIN_SIZE
,
TEXTS_MAX_SIZE
)
);
600
,
TEXTS_MIN_SIZE
,
TEXTS_MAX_SIZE
)
);
pca
.
push_back
(
new
PARAM_CFG_INT
(
wxT
(
"TxtModV"
),
&
g
_ModuleTextSize
.
y
,
pca
.
push_back
(
new
PARAM_CFG_INT
(
wxT
(
"TxtModV"
),
&
bds
.
m
_ModuleTextSize
.
y
,
500
,
TEXTS_MIN_SIZE
,
TEXTS_MAX_SIZE
)
);
500
,
TEXTS_MIN_SIZE
,
TEXTS_MAX_SIZE
)
);
pca
.
push_back
(
new
PARAM_CFG_INT
(
wxT
(
"TxtModH"
),
&
g
_ModuleTextSize
.
x
,
pca
.
push_back
(
new
PARAM_CFG_INT
(
wxT
(
"TxtModH"
),
&
bds
.
m
_ModuleTextSize
.
x
,
500
,
TEXTS_MIN_SIZE
,
TEXTS_MAX_SIZE
)
);
500
,
TEXTS_MIN_SIZE
,
TEXTS_MAX_SIZE
)
);
pca
.
push_back
(
new
PARAM_CFG_INT
(
wxT
(
"TxtModW"
),
&
g
_ModuleTextWidth
,
pca
.
push_back
(
new
PARAM_CFG_INT
(
wxT
(
"TxtModW"
),
&
bds
.
m
_ModuleTextWidth
,
100
,
1
,
TEXTS_MAX_WIDTH
)
);
100
,
1
,
TEXTS_MAX_WIDTH
)
);
pca
.
push_back
(
new
PARAM_CFG_INT
(
wxT
(
"VEgarde"
),
pca
.
push_back
(
new
PARAM_CFG_INT
(
wxT
(
"VEgarde"
),
...
@@ -257,7 +257,7 @@ PARAM_CFG_ARRAY PCB_EDIT_FRAME::GetProjectFileParameters()
...
@@ -257,7 +257,7 @@ PARAM_CFG_ARRAY PCB_EDIT_FRAME::GetProjectFileParameters()
pca
.
push_back
(
new
PARAM_CFG_INT
(
wxT
(
"TxtLar"
),
pca
.
push_back
(
new
PARAM_CFG_INT
(
wxT
(
"TxtLar"
),
&
bds
.
m_PcbTextWidth
,
&
bds
.
m_PcbTextWidth
,
120
,
0
,
0xFFFF
)
);
120
,
0
,
0xFFFF
)
);
pca
.
push_back
(
new
PARAM_CFG_INT
(
wxT
(
"MSegLar"
),
&
g
_ModuleSegmentWidth
,
pca
.
push_back
(
new
PARAM_CFG_INT
(
wxT
(
"MSegLar"
),
&
bds
.
m
_ModuleSegmentWidth
,
120
,
0
,
0xFFFF
)
);
120
,
0
,
0xFFFF
)
);
pca
.
push_back
(
new
PARAM_CFG_FILENAME
(
wxT
(
"LastNetListRead"
),
pca
.
push_back
(
new
PARAM_CFG_FILENAME
(
wxT
(
"LastNetListRead"
),
&
m_lastNetListRead
)
);
&
m_lastNetListRead
)
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment