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
b8a6c53b
Commit
b8a6c53b
authored
Oct 25, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some minor changes and enhancements
parent
e8cb60f9
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
164 additions
and
103 deletions
+164
-103
about_kicad.cpp
common/about_kicad.cpp
+1
-1
displlst.cpp
common/displlst.cpp
+18
-8
listboxes.cpp
cvpcb/listboxes.cpp
+3
-3
pinedit.cpp
eeschema/pinedit.cpp
+56
-15
tool_lib.cpp
eeschema/tool_lib.cpp
+1
-1
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+61
-55
class_pad_draw_functions.cpp
pcbnew/class_pad_draw_functions.cpp
+16
-16
dialog_design_rules.cpp
pcbnew/dialog_design_rules.cpp
+1
-0
dialog_layers_setup.cpp
pcbnew/dialog_layers_setup.cpp
+5
-3
loadcmp.cpp
pcbnew/loadcmp.cpp
+2
-1
No files found.
common/about_kicad.cpp
View file @
b8a6c53b
...
...
@@ -8,7 +8,7 @@
#include "appl_wxstruct.h"
#define BUILD_VERSION "(2009102
1
-unstable)"
#define BUILD_VERSION "(2009102
4
-unstable)"
#ifdef HAVE_SVN_VERSION
...
...
common/displlst.cpp
View file @
b8a6c53b
...
...
@@ -97,15 +97,25 @@ WinEDAListBox::WinEDAListBox( WinEDA_DrawFrame* parent, const wxString& title,
{
Centre
();
}
else
// Ensure the window dialog is
on screen
:
else
// Ensure the window dialog is
inside the main window
:
{
wxPoint
pos
;
m_Parent
->
GetPosition
(
&
pos
.
x
,
&
pos
.
y
);
if
(
pos
.
x
<
0
)
pos
.
x
=
0
;
if
(
pos
.
y
<
0
)
pos
.
y
=
0
;
pos
.
x
+=
20
;
pos
.
y
+=
30
;
wxPoint
pos
=
dialog_position
;
wxPoint
maxpos
;
maxpos
.
x
=
parent
->
GetPosition
().
x
+
parent
->
GetSize
().
x
;
maxpos
.
y
=
parent
->
GetPosition
().
y
+
parent
->
GetSize
().
y
;
wxPoint
endpoint
;
endpoint
.
x
=
pos
.
x
+
GetSize
().
x
;
endpoint
.
y
=
pos
.
y
+
GetSize
().
y
;
if
(
endpoint
.
x
>
maxpos
.
x
)
pos
.
x
-=
endpoint
.
x
-
maxpos
.
x
;
if
(
endpoint
.
y
>
maxpos
.
y
)
pos
.
y
-=
endpoint
.
y
-
maxpos
.
y
;
if
(
pos
.
x
<
parent
->
GetPosition
().
x
)
pos
.
x
=
parent
->
GetPosition
().
x
;
if
(
pos
.
y
<
parent
->
GetPosition
().
y
)
pos
.
y
=
parent
->
GetPosition
().
y
;
Move
(
pos
);
}
}
...
...
cvpcb/listboxes.cpp
View file @
b8a6c53b
...
...
@@ -88,9 +88,9 @@ void WinEDA_CvpcbFrame::BuildCmpListBox()
BOOST_FOREACH
(
COMPONENT
&
component
,
m_components
)
{
msg
.
Printf
(
CMP_FORMAT
,
m_ListCmp
->
GetCount
()
+
1
,
component
.
m_Reference
.
GetData
(
),
component
.
m_Value
.
GetData
(
),
component
.
m_Module
.
GetData
(
)
);
GetChars
(
component
.
m_Reference
),
GetChars
(
component
.
m_Value
),
GetChars
(
component
.
m_Module
)
);
m_ListCmp
->
m_ComponentList
.
Add
(
msg
);
}
...
...
eeschema/pinedit.cpp
View file @
b8a6c53b
...
...
@@ -23,7 +23,7 @@ static int CodeOrient[4] =
#define NBSHAPES 7
static
wxString
shape_list
[
NBSHAPES
]
=
{
_
(
"line"
),
_
(
"invert"
),
_
(
"clock"
),
_
(
"clock inv"
),
_
(
"line"
),
_
(
"invert"
),
_
(
"clock"
),
_
(
"clock inv"
),
_
(
"low in"
),
_
(
"low clock"
),
_
(
"low out"
)
};
...
...
@@ -572,10 +572,10 @@ void WinEDA_LibeditFrame::CreatePin( wxDC* DC )
if
(
g_EditPinByPinIsOn
==
false
)
CurrentPin
->
m_Flags
|=
IS_LINKED
;
CurrentPin
->
m_Pos
.
x
=
GetScreen
()
->
m_Curseur
.
x
;
CurrentPin
->
m_Pos
.
y
=
-
GetScreen
()
->
m_Curseur
.
y
;
CurrentPin
->
m_PinLen
=
LastPinSize
;
CurrentPin
->
m_Orient
=
LastPinOrient
;
CurrentPin
->
m_Pos
.
x
=
GetScreen
()
->
m_Curseur
.
x
;
CurrentPin
->
m_Pos
.
y
=
-
GetScreen
()
->
m_Curseur
.
y
;
CurrentPin
->
m_PinLen
=
LastPinSize
;
CurrentPin
->
m_Orient
=
LastPinOrient
;
CurrentPin
->
m_PinType
=
LastPinType
;
CurrentPin
->
m_PinShape
=
LastPinShape
;
CurrentPin
->
m_PinNameSize
=
LastPinNameSize
;
...
...
@@ -931,13 +931,18 @@ bool sort_by_pin_number( const LIB_PIN* ref, const LIB_PIN* tst )
}
/* Test for duplicate pins:
/* Test for duplicate pins and off grid pins:
* Pins are considered off grid when they are not on the 25 mils grid
* A grid smaller than 25 mils must be used only to build graphic shapes.
*/
void
WinEDA_LibeditFrame
::
OnCheckComponent
(
wxCommandEvent
&
event
)
{
int
error
;
#define MIN_GRID_SIZE 25
int
dup_error
;
int
offgrid_error
;
LIB_PIN
*
Pin
;
wxString
msg
;
wxString
aux_msg
;
if
(
m_component
==
NULL
)
return
;
...
...
@@ -962,13 +967,11 @@ void WinEDA_LibeditFrame::OnCheckComponent( wxCommandEvent& event )
sort
(
PinList
.
begin
(),
PinList
.
end
(),
sort_by_pin_number
);
// Test for duplicates:
error
=
0
;
DIALOG_DISPLAY_HTML_TEXT_BASE
error_display
(
this
,
wxID_ANY
,
_
(
"Marker Info"
),
wxDefaultPosition
,
wxSize
(
750
,
600
)
);
dup_error
=
0
;
DIALOG_DISPLAY_HTML_TEXT_BASE
error_display
(
this
,
wxID_ANY
,
_
(
"Marker Info"
),
wxDefaultPosition
,
wxSize
(
750
,
600
)
);
for
(
unsigned
ii
=
1
;
ii
<
PinList
.
size
();
ii
++
)
{
wxString
aux_msg
;
wxString
stringPinNum
,
stringCurrPinNum
;
LIB_PIN
*
curr_pin
=
PinList
[
ii
];
...
...
@@ -979,7 +982,7 @@ void WinEDA_LibeditFrame::OnCheckComponent( wxCommandEvent& event )
||
Pin
->
m_Unit
!=
curr_pin
->
m_Unit
)
continue
;
error
++
;
dup_
error
++
;
Pin
->
ReturnPinStringNum
(
stringPinNum
);
curr_pin
->
ReturnPinStringNum
(
stringCurrPinNum
);
msg
.
Printf
(
_
(
...
...
@@ -1007,12 +1010,50 @@ with pin %s \"%s\" at location <b>(%.3f, %.3f)</b>"
}
msg
+=
wxT
(
".<br>"
);
error_display
.
m_htmlWindow
->
AppendToPage
(
msg
);
}
// Test for off grid pins:
offgrid_error
=
0
;
for
(
unsigned
ii
=
0
;
ii
<
PinList
.
size
();
ii
++
)
{
Pin
=
PinList
[
ii
];
if
(
(
(
Pin
->
m_Pos
.
x
%
MIN_GRID_SIZE
)
==
0
)
&&
(
(
Pin
->
m_Pos
.
y
%
MIN_GRID_SIZE
)
==
0
)
)
continue
;
// A pin is foun here off grid
offgrid_error
++
;
wxString
stringPinNum
;
Pin
->
ReturnPinStringNum
(
stringPinNum
);
msg
.
Printf
(
_
(
"<b>Off grid pin %s</b>
\"
%s
\"
at location <b>(%.3f, %.3f)</b>"
),
GetChars
(
stringPinNum
),
GetChars
(
Pin
->
m_PinName
),
(
float
)
Pin
->
m_Pos
.
x
/
1000.0
,
(
float
)
-
Pin
->
m_Pos
.
y
/
1000.0
);
if
(
m_component
->
GetPartCount
()
>
1
)
{
aux_msg
.
Printf
(
_
(
" in part %c"
),
'A'
+
Pin
->
m_Unit
);
msg
+=
aux_msg
;
}
if
(
m_showDeMorgan
)
{
if
(
Pin
->
m_Convert
)
msg
+=
_
(
" of converted"
);
else
msg
+=
_
(
" of normal"
);
}
msg
+=
wxT
(
".<br>"
);
error_display
.
m_htmlWindow
->
AppendToPage
(
msg
);
}
if
(
error
==
0
)
DisplayInfoMessage
(
this
,
_
(
"No duplicate pins were found."
)
);
if
(
!
dup_error
&&
!
offgrid_error
)
DisplayInfoMessage
(
this
,
_
(
"No off grid or duplicate pins were found."
)
);
else
error_display
.
ShowModal
();
}
eeschema/tool_lib.cpp
View file @
b8a6c53b
...
...
@@ -153,7 +153,7 @@ void WinEDA_LibeditFrame::ReCreateHToolbar()
m_HToolBar
->
AddSeparator
();
m_HToolBar
->
AddTool
(
ID_LIBEDIT_CHECK_PART
,
wxEmptyString
,
wxBitmap
(
erc_xpm
),
_
(
"Test for duplicate pins"
)
);
wxBitmap
(
erc_xpm
),
_
(
"Test for duplicate pins
and off grid pins
"
)
);
m_HToolBar
->
AddSeparator
();
msg
=
AddHotkeyName
(
_
(
"Zoom in"
),
s_Libedit_Hokeys_Descr
,
HK_ZOOM_IN
);
...
...
internat/fr/kicad.mo
View file @
b8a6c53b
No preview for this file type
internat/fr/kicad.po
View file @
b8a6c53b
This diff is collapsed.
Click to expand it.
pcbnew/class_pad_draw_functions.cpp
View file @
b8a6c53b
...
...
@@ -266,16 +266,16 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode,
if
(
fillpad
)
{
GRFillCSegm
(
&
panel
->
m_ClipBox
,
DC
,
ux0
+
delta_cx
+
mask_margin
,
uy0
+
delta_cy
+
mask_margin
,
ux0
-
delta_cx
-
mask_margin
,
uy0
-
delta_cy
-
mask_margin
,
rotdx
,
color
);
ux0
+
delta_cx
,
uy0
+
delta_cy
,
ux0
-
delta_cx
,
uy0
-
delta_cy
,
rotdx
+
mask_margin
,
color
);
}
else
{
GRCSegm
(
&
panel
->
m_ClipBox
,
DC
,
ux0
+
delta_cx
+
mask_margin
,
uy0
+
delta_cy
+
mask_margin
,
ux0
-
delta_cx
-
mask_margin
,
uy0
-
delta_cy
-
mask_margin
,
rotdx
,
color
);
ux0
+
delta_cx
,
uy0
+
delta_cy
,
ux0
-
delta_cx
,
uy0
-
delta_cy
,
rotdx
+
mask_margin
,
color
);
}
/* Trace de la marge d'isolement */
...
...
@@ -293,20 +293,20 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode,
case
PAD_TRAPEZOID
:
{
int
ddx
,
ddy
;
ddx
=
(
m_DeltaSize
.
x
>>
1
)
+
mask_margin
;
ddy
=
(
m_DeltaSize
.
y
>>
1
)
+
mask_margin
;
/* demi dim dx et dy */
ddx
=
(
m_DeltaSize
.
x
>>
1
);
ddy
=
(
m_DeltaSize
.
y
>>
1
);
/* demi dim dx et dy */
coord
[
0
].
x
=
-
dx
-
ddy
;
coord
[
0
].
y
=
+
dy
+
ddx
;
coord
[
0
].
x
=
-
dx
-
ddy
-
mask_margin
;
coord
[
0
].
y
=
+
dy
+
ddx
+
mask_margin
;
coord
[
1
].
x
=
-
dx
+
ddy
;
coord
[
1
].
y
=
-
dy
-
ddx
;
coord
[
1
].
x
=
-
dx
+
ddy
-
mask_margin
;
coord
[
1
].
y
=
-
dy
-
ddx
-
mask_margin
;
coord
[
2
].
x
=
+
dx
-
ddy
;
coord
[
2
].
y
=
-
dy
+
ddx
;
coord
[
2
].
x
=
+
dx
-
ddy
+
mask_margin
;
coord
[
2
].
y
=
-
dy
+
ddx
-
mask_margin
;
coord
[
3
].
x
=
+
dx
+
ddy
;
coord
[
3
].
y
=
+
dy
-
ddx
;
coord
[
3
].
x
=
+
dx
+
ddy
+
mask_margin
;
coord
[
3
].
y
=
+
dy
-
ddx
+
mask_margin
;
for
(
ii
=
0
;
ii
<
4
;
ii
++
)
{
...
...
pcbnew/dialog_design_rules.cpp
View file @
b8a6c53b
...
...
@@ -91,6 +91,7 @@ DIALOG_DESIGN_RULES::DIALOG_DESIGN_RULES( WinEDA_PcbFrame* parent ) :
Layout
();
GetSizer
()
->
Fit
(
this
);
GetSizer
()
->
SetSizeHints
(
this
);
Center
();
}
...
...
pcbnew/dialog_layers_setup.cpp
View file @
b8a6c53b
...
...
@@ -258,7 +258,7 @@ void DialogLayerSetup::SetLayerType( int Layer, LAYER_T Type )
}
//==============================================================================
// The layer mask for non-copper layers is obtained from the new
// The layer mask for non-copper layers is obtained from the new
// EDA_BoardDesignSettings::m*EnabledLayers, but for compatibility, the mask
// for the copper-layers is obtained from g_DesignSettings::m_CopperLayerCount
...
...
@@ -445,7 +445,7 @@ DialogLayerSetup::DialogLayerSetup( WinEDA_PcbFrame* parent, const wxPoint& pos,
// The copper layer names can be changed, we need a text control
m_LayerNameTextCtrl
[
Layer
]
=
new
wxTextCtrl
(
m_LayerNamePanel
[
Layer
],
ID_LAYERNAMES
+
Layer
,
GetLayerName
(
Layer
),
wxDefaultPosition
,
wxDefaultSize
,
0
/*|wxNO_BORDER*/
);
m_LayerNameTextCtrl
[
Layer
]
->
SetMaxLength
(
20
);
m_LayerNameTextCtrl
[
Layer
]
->
SetMaxLength
(
20
);
#if CONTROL_BACKGROUND_COLORED
m_LayerNameTextCtrl
[
Layer
]
->
SetBackgroundColour
(
GetRowColor
(
Layer
));
...
...
@@ -659,6 +659,8 @@ DialogLayerSetup::DialogLayerSetup( WinEDA_PcbFrame* parent, const wxPoint& pos,
m_LayerEnabledCheckBox
[
i
]
->
Connect
(
wxEVT_KILL_FOCUS
,
wxFocusEventHandler
(
DialogLayerSetup
::
OnLayerEnabledKillFocus
),
NULL
,
this
);
m_LayerEnabledCheckBox
[
i
]
->
Connect
(
wxEVT_SET_FOCUS
,
wxFocusEventHandler
(
DialogLayerSetup
::
OnLayerEnabledSetFocus
),
NULL
,
this
);
}
Centre
();
}
//==============================================================================
...
...
@@ -994,7 +996,7 @@ void DialogLayerSetup::OnOKClick( wxCommandEvent& event )
if
(
m_LayersMask
>>
i
&
0x00000001
)
NumberOfCopperLayers
++
;
}
m_Pcb
->
m_BoardSettings
->
m_CopperLayerCount
=
NumberOfCopperLayers
;
m_Pcb
->
SetEnabledLayers
(
m_LayersMask
);
...
...
pcbnew/loadcmp.cpp
View file @
b8a6c53b
...
...
@@ -362,7 +362,8 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
WinEDAListBox
*
ListBox
=
new
WinEDAListBox
(
active_window
,
wxEmptyString
,
NULL
,
OldName
,
DisplayCmpDoc
,
wxColour
(
200
,
200
,
255
),
GetScreen
()
->
m_Curseur
);
wxColour
(
200
,
200
,
255
),
GetComponentDialogPosition
());
wxBeginBusyCursor
();
...
...
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