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
c1978b32
Commit
c1978b32
authored
Feb 22, 2015
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pcbnew: fix crash when undoing a move exact pad in board editor.
Fix also very minor warnings detected by cppcheck.
parent
014905e7
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
22 additions
and
19 deletions
+22
-19
eda_text.cpp
common/eda_text.cpp
+2
-2
build_BOM_from_board.cpp
pcbnew/build_BOM_from_board.cpp
+1
-1
class_board_design_settings.cpp
pcbnew/class_board_design_settings.cpp
+2
-2
class_module.cpp
pcbnew/class_module.cpp
+1
-3
class_pad_draw_functions.cpp
pcbnew/class_pad_draw_functions.cpp
+3
-3
edit.cpp
pcbnew/edit.cpp
+7
-1
gen_drill_report_files.cpp
pcbnew/exporters/gen_drill_report_files.cpp
+2
-2
hotkeys_board_editor.cpp
pcbnew/hotkeys_board_editor.cpp
+1
-2
dxf2brd_items.cpp
pcbnew/import_dxf/dxf2brd_items.cpp
+1
-1
tool_pcb.cpp
pcbnew/tool_pcb.cpp
+2
-2
No files found.
common/eda_text.cpp
View file @
c1978b32
...
@@ -35,9 +35,9 @@
...
@@ -35,9 +35,9 @@
// Conversion to application internal units defined at build time.
// Conversion to application internal units defined at build time.
#if defined( PCBNEW )
#if defined( PCBNEW )
#include <class_board_item.h>
#include <class_board_item.h>
// for FMT_IU
#elif defined( EESCHEMA )
#elif defined( EESCHEMA )
#include <sch_item_struct.h>
#include <sch_item_struct.h>
// for FMT_IU
#elif defined( GERBVIEW )
#elif defined( GERBVIEW )
#elif defined( PL_EDITOR )
#elif defined( PL_EDITOR )
#include <base_units.h>
#include <base_units.h>
...
...
pcbnew/build_BOM_from_board.cpp
View file @
c1978b32
...
@@ -132,7 +132,7 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent )
...
@@ -132,7 +132,7 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent )
bool
valExist
=
false
;
bool
valExist
=
false
;
// try to find component in existing list
// try to find component in existing list
for
(
iter
=
list
.
begin
();
iter
!=
list
.
end
();
iter
++
)
for
(
iter
=
list
.
begin
();
iter
!=
list
.
end
();
++
iter
)
{
{
cmp
*
current
=
*
iter
;
cmp
*
current
=
*
iter
;
...
...
pcbnew/class_board_design_settings.cpp
View file @
c1978b32
...
@@ -242,7 +242,7 @@ int BOARD_DESIGN_SETTINGS::GetBiggestClearanceValue()
...
@@ -242,7 +242,7 @@ int BOARD_DESIGN_SETTINGS::GetBiggestClearanceValue()
int
clearance
=
m_NetClasses
.
GetDefault
()
->
GetClearance
();
int
clearance
=
m_NetClasses
.
GetDefault
()
->
GetClearance
();
//Read list of Net Classes
//Read list of Net Classes
for
(
NETCLASSES
::
const_iterator
nc
=
m_NetClasses
.
begin
();
nc
!=
m_NetClasses
.
end
();
nc
++
)
for
(
NETCLASSES
::
const_iterator
nc
=
m_NetClasses
.
begin
();
nc
!=
m_NetClasses
.
end
();
++
nc
)
{
{
NETCLASSPTR
netclass
=
nc
->
second
;
NETCLASSPTR
netclass
=
nc
->
second
;
clearance
=
std
::
max
(
clearance
,
netclass
->
GetClearance
()
);
clearance
=
std
::
max
(
clearance
,
netclass
->
GetClearance
()
);
...
@@ -257,7 +257,7 @@ int BOARD_DESIGN_SETTINGS::GetSmallestClearanceValue()
...
@@ -257,7 +257,7 @@ int BOARD_DESIGN_SETTINGS::GetSmallestClearanceValue()
int
clearance
=
m_NetClasses
.
GetDefault
()
->
GetClearance
();
int
clearance
=
m_NetClasses
.
GetDefault
()
->
GetClearance
();
//Read list of Net Classes
//Read list of Net Classes
for
(
NETCLASSES
::
const_iterator
nc
=
m_NetClasses
.
begin
();
nc
!=
m_NetClasses
.
end
();
nc
++
)
for
(
NETCLASSES
::
const_iterator
nc
=
m_NetClasses
.
begin
();
nc
!=
m_NetClasses
.
end
();
++
nc
)
{
{
NETCLASSPTR
netclass
=
nc
->
second
;
NETCLASSPTR
netclass
=
nc
->
second
;
clearance
=
std
::
min
(
clearance
,
netclass
->
GetClearance
()
);
clearance
=
std
::
min
(
clearance
,
netclass
->
GetClearance
()
);
...
...
pcbnew/class_module.cpp
View file @
c1978b32
...
@@ -145,9 +145,7 @@ MODULE::MODULE( const MODULE& aModule ) :
...
@@ -145,9 +145,7 @@ MODULE::MODULE( const MODULE& aModule ) :
if
(
item
->
GetShape3DName
().
IsEmpty
()
)
// do not copy empty shapes.
if
(
item
->
GetShape3DName
().
IsEmpty
()
)
// do not copy empty shapes.
continue
;
continue
;
S3D_MASTER
*
t3d
=
m_3D_Drawings
;
S3D_MASTER
*
t3d
=
new
S3D_MASTER
(
this
);
t3d
=
new
S3D_MASTER
(
this
);
t3d
->
Copy
(
item
);
t3d
->
Copy
(
item
);
m_3D_Drawings
.
PushBack
(
t3d
);
m_3D_Drawings
.
PushBack
(
t3d
);
}
}
...
...
pcbnew/class_pad_draw_functions.cpp
View file @
c1978b32
...
@@ -120,10 +120,10 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode,
...
@@ -120,10 +120,10 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode,
DISPLAY_OPTIONS
*
displ_opts
=
(
DISPLAY_OPTIONS
*
)
frame
->
GetDisplayOptions
();
DISPLAY_OPTIONS
*
displ_opts
=
(
DISPLAY_OPTIONS
*
)
frame
->
GetDisplayOptions
();
PCB_SCREEN
*
screen
=
frame
->
GetScreen
();
PCB_SCREEN
*
screen
=
frame
->
GetScreen
();
if
(
displ_opts
->
m_DisplayPadFill
==
FILLED
)
if
(
displ_opts
&&
displ_opts
->
m_DisplayPadFill
==
SKETCH
)
drawInfo
.
m_ShowPadFilled
=
true
;
else
drawInfo
.
m_ShowPadFilled
=
false
;
drawInfo
.
m_ShowPadFilled
=
false
;
else
drawInfo
.
m_ShowPadFilled
=
true
;
EDA_COLOR_T
color
=
BLACK
;
EDA_COLOR_T
color
=
BLACK
;
if
(
m_layerMask
[
F_Cu
]
)
if
(
m_layerMask
[
F_Cu
]
)
...
...
pcbnew/edit.cpp
View file @
c1978b32
...
@@ -1516,8 +1516,14 @@ void PCB_EDIT_FRAME::moveExact()
...
@@ -1516,8 +1516,14 @@ void PCB_EDIT_FRAME::moveExact()
{
{
BOARD_ITEM
*
item
=
GetScreen
()
->
GetCurItem
();
BOARD_ITEM
*
item
=
GetScreen
()
->
GetCurItem
();
// When a pad is modified, the full footprint is saved
BOARD_ITEM
*
itemToSave
=
item
;
if
(
item
->
Type
()
==
PCB_PAD_T
)
itemToSave
=
item
->
GetParent
();
// Could be moved or rotated
// Could be moved or rotated
SaveCopyInUndoList
(
item
,
UR_CHANGED
);
SaveCopyInUndoList
(
item
ToSave
,
UR_CHANGED
);
item
->
Move
(
translation
);
item
->
Move
(
translation
);
item
->
Rotate
(
item
->
GetPosition
(),
rotation
);
item
->
Rotate
(
item
->
GetPosition
(),
rotation
);
...
...
pcbnew/exporters/gen_drill_report_files.cpp
View file @
c1978b32
...
@@ -361,9 +361,9 @@ bool EXCELLON_WRITER::GenDrillReportFile( const wxString& aFullFileName )
...
@@ -361,9 +361,9 @@ bool EXCELLON_WRITER::GenDrillReportFile( const wxString& aFullFileName )
}
}
if
(
gen_NPTH_holes
)
if
(
gen_NPTH_holes
)
sprintf
(
line
,
"
\n
Total unplated holes count %
d
\n\n\n
"
,
totalHoleCount
);
sprintf
(
line
,
"
\n
Total unplated holes count %
u
\n\n\n
"
,
totalHoleCount
);
else
else
sprintf
(
line
,
"
\n
Total plated holes count %
d
\n\n\n
"
,
totalHoleCount
);
sprintf
(
line
,
"
\n
Total plated holes count %
u
\n\n\n
"
,
totalHoleCount
);
fputs
(
line
,
m_file
);
fputs
(
line
,
m_file
);
...
...
pcbnew/hotkeys_board_editor.cpp
View file @
c1978b32
...
@@ -91,8 +91,7 @@ void PCB_EDIT_FRAME::CallMacros( wxDC* aDC, const wxPoint& aPosition, int aNumbe
...
@@ -91,8 +91,7 @@ void PCB_EDIT_FRAME::CallMacros( wxDC* aDC, const wxPoint& aPosition, int aNumbe
GeneralControl
(
aDC
,
tPosition
);
GeneralControl
(
aDC
,
tPosition
);
for
(
std
::
list
<
MACROS_RECORD
>::
iterator
i
=
m_Macros
[
aNumber
].
m_Record
.
begin
();
for
(
std
::
list
<
MACROS_RECORD
>::
iterator
i
=
m_Macros
[
aNumber
].
m_Record
.
begin
();
i
!=
m_Macros
[
aNumber
].
m_Record
.
end
();
i
!=
m_Macros
[
aNumber
].
m_Record
.
end
();
++
i
)
i
++
)
{
{
wxPoint
tmpPos
=
GetNearestGridPosition
(
tPosition
+
i
->
m_Position
);
wxPoint
tmpPos
=
GetNearestGridPosition
(
tPosition
+
i
->
m_Position
);
...
...
pcbnew/import_dxf/dxf2brd_items.cpp
View file @
c1978b32
...
@@ -447,7 +447,7 @@ void DXF2BRD_CONVERTER::addHeader( const DRW_Header* data )
...
@@ -447,7 +447,7 @@ void DXF2BRD_CONVERTER::addHeader( const DRW_Header* data )
{
{
std
::
map
<
std
::
string
,
DRW_Variant
*>::
const_iterator
it
;
std
::
map
<
std
::
string
,
DRW_Variant
*>::
const_iterator
it
;
for
(
it
=
data
->
vars
.
begin
();
it
!=
data
->
vars
.
end
();
it
++
)
for
(
it
=
data
->
vars
.
begin
();
it
!=
data
->
vars
.
end
();
++
it
)
{
{
std
::
string
key
=
(
(
*
it
).
first
).
c_str
();
std
::
string
key
=
(
(
*
it
).
first
).
c_str
();
...
...
pcbnew/tool_pcb.cpp
View file @
c1978b32
...
@@ -238,9 +238,9 @@ void PCB_EDIT_FRAME::ReCreateHToolbar()
...
@@ -238,9 +238,9 @@ void PCB_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar
->
AddSeparator
();
m_mainToolBar
->
AddSeparator
();
msg
=
AddHotkeyName
(
HELP_UNDO
,
g_Board_Editor_Hokeys_Descr
,
HK_UNDO
,
IS_COMMENT
);
msg
=
AddHotkeyName
(
HELP_UNDO
,
g_Board_Editor_Hokeys_Descr
,
HK_UNDO
,
IS_COMMENT
);
m_mainToolBar
->
AddTool
(
wxID_UNDO
,
wxEmptyString
,
KiBitmap
(
undo_xpm
),
HELP_UNDO
);
m_mainToolBar
->
AddTool
(
wxID_UNDO
,
wxEmptyString
,
KiBitmap
(
undo_xpm
),
msg
);
msg
=
AddHotkeyName
(
HELP_REDO
,
g_Board_Editor_Hokeys_Descr
,
HK_REDO
,
IS_COMMENT
);
msg
=
AddHotkeyName
(
HELP_REDO
,
g_Board_Editor_Hokeys_Descr
,
HK_REDO
,
IS_COMMENT
);
m_mainToolBar
->
AddTool
(
wxID_REDO
,
wxEmptyString
,
KiBitmap
(
redo_xpm
),
HELP_REDO
);
m_mainToolBar
->
AddTool
(
wxID_REDO
,
wxEmptyString
,
KiBitmap
(
redo_xpm
),
msg
);
m_mainToolBar
->
AddSeparator
();
m_mainToolBar
->
AddSeparator
();
m_mainToolBar
->
AddTool
(
wxID_PRINT
,
wxEmptyString
,
KiBitmap
(
print_button_xpm
),
m_mainToolBar
->
AddTool
(
wxID_PRINT
,
wxEmptyString
,
KiBitmap
(
print_button_xpm
),
...
...
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