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
cbb398e8
Commit
cbb398e8
authored
Jul 14, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compil issue in non debug mode. Minor code enhancement.
parent
2fb2ab0d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
37 deletions
+31
-37
AboutDialog_main.cpp
common/dialog_about/AboutDialog_main.cpp
+1
-1
class_pad.cpp
pcbnew/class_pad.cpp
+18
-36
class_pad.h
pcbnew/class_pad.h
+12
-0
No files found.
common/dialog_about/AboutDialog_main.cpp
View file @
cbb398e8
...
...
@@ -52,7 +52,7 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
info
.
SetAppName
(
wxT
(
".: "
)
+
wxGetApp
().
GetTitle
()
+
wxT
(
" :."
)
);
/* Copyright information */
info
.
SetCopyright
(
wxT
(
"(C) 1992-201
0
KiCad Developers Team"
)
);
info
.
SetCopyright
(
wxT
(
"(C) 1992-201
1
KiCad Developers Team"
)
);
/* KiCad build version */
wxString
version
;
...
...
pcbnew/class_pad.cpp
View file @
cbb398e8
...
...
@@ -605,17 +605,6 @@ void D_PAD::DisplayInfo( EDA_DRAW_FRAME* frame )
wxString
Line
;
BOARD
*
board
;
/* Pad messages */
static
const
wxString
Msg_Pad_Shape
[
6
]
=
{
wxT
(
"??? "
),
wxT
(
"Circ"
),
wxT
(
"Rect"
),
wxT
(
"Oval"
),
wxT
(
"trap"
),
wxT
(
"spec"
)
};
static
const
wxString
Msg_Pad_Attribut
[
5
]
=
{
wxT
(
"norm"
),
wxT
(
"smd "
),
wxT
(
"conn"
),
wxT
(
"????"
)
};
frame
->
EraseMsgBox
();
module
=
(
MODULE
*
)
m_Parent
;
...
...
@@ -739,12 +728,7 @@ void D_PAD::DisplayInfo( EDA_DRAW_FRAME* frame )
frame
->
AppendMsgPanel
(
_
(
"Layer"
),
layerInfo
,
DARKGREEN
);
int
attribut
=
m_Attribut
&
15
;
if
(
attribut
>
3
)
attribut
=
3
;
frame
->
AppendMsgPanel
(
Msg_Pad_Shape
[
m_PadShape
],
Msg_Pad_Attribut
[
attribut
],
DARKGREEN
);
frame
->
AppendMsgPanel
(
ShowPadShape
(),
ShowPadAttr
(),
DARKGREEN
);
valeur_param
(
m_Size
.
x
,
Line
);
frame
->
AppendMsgPanel
(
_
(
"H Size"
),
Line
,
RED
);
...
...
@@ -869,49 +853,46 @@ int D_PAD::Compare( const D_PAD* padref, const D_PAD* padcmp )
}
#if defined(DEBUG)
// @todo: could this be usable elsewhere also?
static
const
char
*
ShowPadType
(
int
aPadType
)
wxString
D_PAD
::
ShowPadShape
()
const
{
switch
(
aPadTy
pe
)
switch
(
m_PadSha
pe
)
{
case
PAD_CIRCLE
:
return
"circle"
;
return
_
(
"Circle"
)
;
case
PAD_OVAL
:
return
"oval"
;
return
_
(
"Oval"
)
;
case
PAD_RECT
:
return
"rect"
;
return
_
(
"Rect"
)
;
case
PAD_TRAPEZOID
:
return
"trap"
;
return
_
(
"Trap"
)
;
default
:
return
"??unknown??"
;
return
wxT
(
"??Unknown??"
)
;
}
}
static
const
char
*
ShowPadAttr
(
int
aPadAttr
)
wxString
D_PAD
::
ShowPadAttr
()
const
{
switch
(
aPadAttr
)
switch
(
m_Attribut
&
0x0F
)
{
case
PAD_STANDARD
:
return
"STD"
;
return
_
(
"Std"
)
;
case
PAD_SMD
:
return
"SMD"
;
return
_
(
"Smd"
)
;
case
PAD_CONN
:
return
"CONN"
;
return
_
(
"Conn"
)
;
case
PAD_HOLE_NOT_PLATED
:
return
"HOLE"
;
return
_
(
"Not Plated"
)
;
default
:
return
"??unkown??"
;
return
wxT
(
"??Unkown??"
)
;
}
}
...
...
@@ -936,6 +917,7 @@ wxString D_PAD::GetSelectMenuText() const
return
text
;
}
#if defined(DEBUG)
/**
* Function Show
...
...
@@ -955,8 +937,8 @@ void D_PAD::Show( int nestLevel, std::ostream& os )
// for now, make it look like XML:
NestedSpace
(
nestLevel
,
os
)
<<
'<'
<<
GetClass
().
Lower
().
mb_str
()
<<
" shape=
\"
"
<<
ShowPad
Type
(
m_PadShape
)
<<
'"'
<<
" attr=
\"
"
<<
ShowPadAttr
(
m_Attribut
)
<<
'"'
<<
" shape=
\"
"
<<
ShowPad
Shape
(
)
<<
'"'
<<
" attr=
\"
"
<<
ShowPadAttr
(
)
<<
'"'
<<
" num=
\"
"
<<
padname
<<
'"'
<<
" net=
\"
"
<<
m_Netname
.
mb_str
()
<<
'"'
<<
" netcode=
\"
"
<<
GetNet
()
<<
'"'
<<
...
...
pcbnew/class_pad.h
View file @
cbb398e8
...
...
@@ -359,6 +359,18 @@ public:
virtual
wxString
GetSelectMenuText
()
const
;
/**
* Function ShowPadShape
* @return the name of the shape
*/
wxString
ShowPadShape
()
const
;
/**
* Function ShowPadAttr
* @return the name of the pad type (attribute) : STD, SMD ...
*/
wxString
ShowPadAttr
()
const
;
#if defined(DEBUG)
/**
...
...
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