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
cf01c580
Commit
cf01c580
authored
Jan 24, 2015
by
Garth Corral
Browse files
Options
Browse Files
Download
Plain Diff
Merge trunk @ 5386
parents
0bebc34a
f0a52644
Changes
78
Hide whitespace changes
Inline
Side-by-side
Showing
78 changed files
with
389 additions
and
273 deletions
+389
-273
vrml_aux.cpp
3d-viewer/vrml_aux.cpp
+10
-6
vrml_aux.h
3d-viewer/vrml_aux.h
+0
-1
vrml_v1_modelparser.cpp
3d-viewer/vrml_v1_modelparser.cpp
+5
-5
vrml_v2_modelparser.cpp
3d-viewer/vrml_v2_modelparser.cpp
+11
-13
CMakeLists.txt
CMakeLists.txt
+1
-0
bitmap2component.cpp
bitmap2component/bitmap2component.cpp
+8
-3
base_struct.cpp
common/base_struct.cpp
+4
-4
base_units.cpp
common/base_units.cpp
+1
-1
basicframe.cpp
common/basicframe.cpp
+1
-2
class_bitmap_base.cpp
common/class_bitmap_base.cpp
+1
-1
dialog_shim.cpp
common/dialog_shim.cpp
+3
-3
dialog_image_editor.cpp
common/dialogs/dialog_image_editor.cpp
+1
-1
draw_frame.cpp
common/draw_frame.cpp
+3
-5
opengl_gal.cpp
common/gal/opengl/opengl_gal.cpp
+2
-1
grid_tricks.cpp
common/grid_tricks.cpp
+1
-1
single_top.cpp
common/single_top.cpp
+2
-2
CMakeLists.txt
cvpcb/CMakeLists.txt
+0
-1
autosel.cpp
cvpcb/autosel.cpp
+1
-1
readwrite_dlgs.cpp
cvpcb/readwrite_dlgs.cpp
+1
-1
class_libentry.cpp
eeschema/class_libentry.cpp
+2
-2
class_libentry.h
eeschema/class_libentry.h
+2
-2
dialog_edit_libentry_fields_in_lib.cpp
eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp
+1
-1
dialog_lib_edit_pin.cpp
eeschema/dialogs/dialog_lib_edit_pin.cpp
+2
-2
dialog_lib_edit_pin.h
eeschema/dialogs/dialog_lib_edit_pin.h
+5
-5
lib_pin.cpp
eeschema/lib_pin.cpp
+27
-14
pinedit.cpp
eeschema/pinedit.cpp
+6
-7
sch_marker.cpp
eeschema/sch_marker.cpp
+10
-12
sch_marker.h
eeschema/sch_marker.h
+6
-3
class_gerbview_layer_widget.cpp
gerbview/class_gerbview_layer_widget.cpp
+1
-1
export_to_pcbnew.cpp
gerbview/export_to_pcbnew.cpp
+1
-1
gerbview_frame.cpp
gerbview/gerbview_frame.cpp
+0
-5
base_struct.h
include/base_struct.h
+2
-1
class_bitmap_base.h
include/class_bitmap_base.h
+2
-2
class_title_block.h
include/class_title_block.h
+1
-1
wxstruct.h
include/wxstruct.h
+3
-6
kicad.cpp
kicad/kicad.cpp
+1
-1
class_pl_editor_layout.h
pagelayout_editor/class_pl_editor_layout.h
+1
-1
properties_frame.cpp
pagelayout_editor/properties_frame.cpp
+1
-1
attenuators.cpp
pcb_calculator/attenuators.cpp
+4
-2
CMakeLists.txt
pcbnew/CMakeLists.txt
+0
-1
auto_place_footprints.cpp
pcbnew/autorouter/auto_place_footprints.cpp
+1
-2
basepcbframe.cpp
pcbnew/basepcbframe.cpp
+0
-5
block.cpp
pcbnew/block.cpp
+1
-1
class_board.cpp
pcbnew/class_board.cpp
+62
-16
class_board_connected_item.cpp
pcbnew/class_board_connected_item.cpp
+4
-4
class_drc_item.cpp
pcbnew/class_drc_item.cpp
+5
-3
class_module.cpp
pcbnew/class_module.cpp
+0
-1
class_module.h
pcbnew/class_module.h
+12
-0
class_netinfo.h
pcbnew/class_netinfo.h
+1
-1
class_netinfo_item.cpp
pcbnew/class_netinfo_item.cpp
+10
-8
class_pad.cpp
pcbnew/class_pad.cpp
+1
-1
class_pad.h
pcbnew/class_pad.h
+1
-1
class_pcb_layer_widget.cpp
pcbnew/class_pcb_layer_widget.cpp
+2
-2
class_pcb_text.cpp
pcbnew/class_pcb_text.cpp
+1
-1
class_zone.cpp
pcbnew/class_zone.cpp
+9
-15
class_zone.h
pcbnew/class_zone.h
+4
-5
cross-probing.cpp
pcbnew/cross-probing.cpp
+1
-0
dialog_design_rules.cpp
pcbnew/dialogs/dialog_design_rules.cpp
+2
-2
dialog_freeroute_exchange.cpp
pcbnew/dialogs/dialog_freeroute_exchange.cpp
+1
-1
drag.h
pcbnew/drag.h
+3
-3
dragsegm.cpp
pcbnew/dragsegm.cpp
+9
-9
drc.cpp
pcbnew/drc.cpp
+17
-5
drc_stuff.h
pcbnew/drc_stuff.h
+2
-2
footprint_wizard_frame.cpp
pcbnew/footprint_wizard_frame.cpp
+5
-5
github_getliblist.cpp
pcbnew/github/github_getliblist.cpp
+1
-1
legacy_netlist_reader.cpp
pcbnew/legacy_netlist_reader.cpp
+1
-0
modules.cpp
pcbnew/modules.cpp
+16
-21
modview_frame.cpp
pcbnew/modview_frame.cpp
+4
-4
pcb_parser.cpp
pcbnew/pcb_parser.cpp
+59
-12
pcb_parser.h
pcbnew/pcb_parser.h
+11
-2
pcbframe.cpp
pcbnew/pcbframe.cpp
+0
-5
protos.h
pcbnew/protos.h
+0
-2
ratsnest.cpp
pcbnew/ratsnest.cpp
+1
-1
specctra_test.cpp
pcbnew/specctra_test.cpp
+1
-3
zones_by_polygon.cpp
pcbnew/zones_by_polygon.cpp
+2
-2
PolyLine.cpp
polygon/PolyLine.cpp
+2
-2
PolyLine.h
polygon/PolyLine.h
+2
-2
wx_python_helpers.cpp
scripting/wx_python_helpers.cpp
+1
-0
No files found.
3d-viewer/vrml_aux.cpp
View file @
cf01c580
...
...
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 1992-201
4
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-201
5
KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -28,9 +28,13 @@
#include "vrml_aux.h"
char
SkipGetChar
(
FILE
*
File
)
static
int
SkipGetChar
(
FILE
*
File
);
static
int
SkipGetChar
(
FILE
*
File
)
{
char
c
;
int
c
;
bool
re_parse
;
if
(
(
c
=
fgetc
(
File
)
)
==
EOF
)
...
...
@@ -92,7 +96,7 @@ char SkipGetChar( FILE* File )
char
*
GetNextTag
(
FILE
*
File
,
char
*
tag
)
{
char
c
=
SkipGetChar
(
File
);
int
c
=
SkipGetChar
(
File
);
if
(
c
==
EOF
)
{
...
...
@@ -136,7 +140,7 @@ char* GetNextTag( FILE* File, char* tag )
int
read_NotImplemented
(
FILE
*
File
,
char
closeChar
)
{
char
c
;
int
c
;
// DBG( printf( "look for %c\n", closeChar) );
while
(
(
c
=
fgetc
(
File
)
)
!=
EOF
)
...
...
@@ -189,7 +193,7 @@ int parseVertex( FILE* File, glm::vec3& dst_vertex )
dst_vertex
.
y
=
b
;
dst_vertex
.
z
=
c
;
char
s
=
SkipGetChar
(
File
);
int
s
=
SkipGetChar
(
File
);
if
(
s
!=
EOF
)
{
...
...
3d-viewer/vrml_aux.h
View file @
cf01c580
...
...
@@ -49,7 +49,6 @@
#include <wx/glcanvas.h>
int
read_NotImplemented
(
FILE
*
File
,
char
closeChar
);
char
SkipGetChar
(
FILE
*
File
);
int
parseVertexList
(
FILE
*
File
,
std
::
vector
<
glm
::
vec3
>
&
dst_vector
);
int
parseVertex
(
FILE
*
File
,
glm
::
vec3
&
dst_vertex
);
int
parseFloat
(
FILE
*
File
,
float
*
dst_float
);
...
...
3d-viewer/vrml_v1_modelparser.cpp
View file @
cf01c580
...
...
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 1992-201
4
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-201
5
KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -93,7 +93,7 @@ void VRML1_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlunits_to_3
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
'}'
)
||
(
*
text
==
']'
)
)
if
(
(
*
text
==
'}'
)
||
(
*
text
==
']'
)
)
{
continue
;
}
...
...
@@ -187,7 +187,7 @@ int VRML1_MODEL_PARSER::readMaterial()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -235,7 +235,7 @@ int VRML1_MODEL_PARSER::readCoordinate3()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -263,7 +263,7 @@ int VRML1_MODEL_PARSER::readIndexedFaceSet()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
3d-viewer/vrml_v2_modelparser.cpp
View file @
cf01c580
...
...
@@ -88,14 +88,13 @@ void VRML2_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlunits_to_3
glScalef
(
matScale
.
x
,
matScale
.
y
,
matScale
.
z
);
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
SetLocaleTo_C_standard
();
LOCALE_IO
toggle
;
// Temporary switch the locale to standard C to r/w floats
childs
.
clear
();
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
'}'
)
||
(
*
text
==
']'
)
)
if
(
(
*
text
==
'}'
)
||
(
*
text
==
']'
)
)
{
continue
;
}
...
...
@@ -117,7 +116,6 @@ void VRML2_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlunits_to_3
}
fclose
(
m_file
);
SetLocaleTo_Default
();
// revert to the current locale
// DBG( printf( "chils size:%lu\n", childs.size() ) );
...
...
@@ -140,7 +138,7 @@ int VRML2_MODEL_PARSER::read_Transform()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -259,7 +257,7 @@ int VRML2_MODEL_PARSER::read_DEF()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
// DBG( printf( " skiping %c\n", *text) );
continue
;
...
...
@@ -316,7 +314,7 @@ int VRML2_MODEL_PARSER::read_Shape()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -363,7 +361,7 @@ int VRML2_MODEL_PARSER::read_Appearance()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -468,7 +466,7 @@ int VRML2_MODEL_PARSER::read_Material()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -561,7 +559,7 @@ int VRML2_MODEL_PARSER::read_IndexedFaceSet()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -744,7 +742,7 @@ int VRML2_MODEL_PARSER::read_Color()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -774,7 +772,7 @@ int VRML2_MODEL_PARSER::read_Normal()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -812,7 +810,7 @@ int VRML2_MODEL_PARSER::read_Coordinate()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
CMakeLists.txt
View file @
cf01c580
...
...
@@ -425,6 +425,7 @@ set( wxWidgets_CONFIG_OPTIONS --static=no )
if
(
KICAD_USE_WEBKIT AND BUILD_GITHUB_PLUGIN
)
set
(
webkitlib
"webview"
)
add_definitions
(
-DKICAD_USE_WEBKIT
)
else
()
set
(
webkitlib
""
)
endif
()
...
...
bitmap2component/bitmap2component.cpp
View file @
cf01c580
...
...
@@ -37,6 +37,7 @@
#include <layers_id_colors_and_visibility.h>
#include <potracelib.h>
#include <auxiliary.h>
#include <common.h>
#include <bitmap2component.h>
...
...
@@ -158,6 +159,12 @@ int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile,
st
=
potrace_trace
(
param
,
aPotrace_bitmap
);
if
(
!
st
||
st
->
status
!=
POTRACE_STATUS_OK
)
{
if
(
st
)
{
potrace_state_free
(
st
);
}
potrace_param_free
(
param
);
fprintf
(
stderr
,
"Error tracing bitmap: %s
\n
"
,
strerror
(
errno
)
);
return
1
;
}
...
...
@@ -431,7 +438,7 @@ void BITMAPCONV_INFO::CreateOutputFile( BMP2CMP_MOD_LAYER aModLayer )
potrace_dpoint_t
(
*
c
)[
3
];
setlocale
(
LC_NUMERIC
,
"C"
);
// Switch the locale to standard C
LOCALE_IO
toggle
;
// Temporary switch the locale to standard C to r/w floats
// The layer name has meaning only for .kicad_mod files.
// For these files the header creates 2 invisible texts: value and ref
...
...
@@ -524,8 +531,6 @@ void BITMAPCONV_INFO::CreateOutputFile( BMP2CMP_MOD_LAYER aModLayer )
}
OuputFileEnd
();
setlocale
(
LC_NUMERIC
,
""
);
// revert to the current locale
}
...
...
common/base_struct.cpp
View file @
cf01c580
...
...
@@ -49,7 +49,7 @@ enum textbox {
EDA_ITEM
::
EDA_ITEM
(
EDA_ITEM
*
parent
,
KICAD_T
idType
)
{
I
nitVars
();
i
nitVars
();
m_StructType
=
idType
;
m_Parent
=
parent
;
}
...
...
@@ -57,14 +57,14 @@ EDA_ITEM::EDA_ITEM( EDA_ITEM* parent, KICAD_T idType )
EDA_ITEM
::
EDA_ITEM
(
KICAD_T
idType
)
{
I
nitVars
();
i
nitVars
();
m_StructType
=
idType
;
}
EDA_ITEM
::
EDA_ITEM
(
const
EDA_ITEM
&
base
)
{
I
nitVars
();
i
nitVars
();
m_StructType
=
base
.
m_StructType
;
m_Parent
=
base
.
m_Parent
;
m_Flags
=
base
.
m_Flags
;
...
...
@@ -75,7 +75,7 @@ EDA_ITEM::EDA_ITEM( const EDA_ITEM& base )
}
void
EDA_ITEM
::
I
nitVars
()
void
EDA_ITEM
::
i
nitVars
()
{
m_StructType
=
TYPE_NOT_INIT
;
Pnext
=
NULL
;
// Linked list: Link (next struct)
...
...
common/base_units.cpp
View file @
cf01c580
...
...
@@ -83,7 +83,7 @@ std::string Double2Str( double aValue )
len
=
sprintf
(
buf
,
"%.16g"
,
aValue
);
}
return
std
::
string
(
buf
,
len
);
;
return
std
::
string
(
buf
,
len
);
}
...
...
common/basicframe.cpp
View file @
cf01c580
...
...
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2013
-2015
Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -72,7 +72,6 @@ EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType,
m_Ident
=
aFrameType
;
m_mainToolBar
=
NULL
;
m_FrameIsActive
=
true
;
m_hasAutoSave
=
false
;
m_autoSaveState
=
false
;
m_autoSaveInterval
=
-
1
;
...
...
common/class_bitmap_base.cpp
View file @
cf01c580
...
...
@@ -197,7 +197,7 @@ bool BITMAP_BASE::LoadData( LINE_READER& aLine, wxString& aErrorMsg )
}
EDA_RECT
BITMAP_BASE
::
GetBoundingBox
()
const
const
EDA_RECT
BITMAP_BASE
::
GetBoundingBox
()
const
{
EDA_RECT
rect
;
...
...
common/dialog_shim.cpp
View file @
cf01c580
...
...
@@ -411,14 +411,14 @@ public:
// wxModalEventLoop depends on this (so we can't just use ON_BLOCK_EXIT or
// something similar here)
#if wxUSE_EXCEPTIONS
for
( ;
; )
for
( ;
; )
{
try
{
#endif // wxUSE_EXCEPTIONS
// this is the event loop itself
for
( ;
; )
for
( ;
; )
{
// generate and process idle events for as long as we don't
// have anything else to do
...
...
@@ -446,7 +446,7 @@ public:
// handlers endlessly generate new events but they shouldn't do
// this in a well-behaved program and we shouldn't just discard the
// events we already have, they might be important.
for
( ;
; )
for
( ;
; )
{
bool hasMoreEvents = false;
if ( wxTheApp && wxTheApp->HasPendingEvents() )
...
...
common/dialogs/dialog_image_editor.cpp
View file @
cf01c580
...
...
@@ -41,7 +41,7 @@ DIALOG_IMAGE_EDITOR::DIALOG_IMAGE_EDITOR( wxWindow* aParent, BITMAP_BASE* aItem
m_buttonUndoLast
->
Enable
(
false
);
wxString
msg
;
msg
.
Printf
(
wxT
(
"%f"
),
m_workingImage
->
m_Scale
);
m_textCtrlScale
->
SetValue
(
msg
);
;
m_textCtrlScale
->
SetValue
(
msg
);
GetSizer
()
->
SetSizeHints
(
this
);
Layout
();
...
...
common/draw_frame.cpp
View file @
cf01c580
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.fr
* Copyright (C) 2008-201
1
Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-201
1
KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2004
-2015
Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.fr
* Copyright (C) 2008-201
5
Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-201
5
KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -226,8 +226,6 @@ void EDA_DRAW_FRAME::EraseMsgBox()
void
EDA_DRAW_FRAME
::
OnActivate
(
wxActivateEvent
&
event
)
{
m_FrameIsActive
=
event
.
GetActive
();
if
(
m_canvas
)
m_canvas
->
SetCanStartBlock
(
-
1
);
...
...
common/gal/opengl/opengl_gal.cpp
View file @
cf01c580
...
...
@@ -815,10 +815,11 @@ void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd
VECTOR2D
startEndVector
=
aEndPoint
-
aStartPoint
;
double
lineLength
=
startEndVector
.
EuclideanNorm
();
double
scale
=
0.5
*
lineWidth
/
lineLength
;
if
(
lineLength
<=
0.0
)
return
;
double
scale
=
0.5
*
lineWidth
/
lineLength
;
// The perpendicular vector also needs transformations
glm
::
vec4
vector
=
currentManager
->
GetTransformation
()
*
...
...
common/grid_tricks.cpp
View file @
cf01c580
...
...
@@ -65,7 +65,7 @@ void GRID_TRICKS::getSelectedArea()
wxArrayInt
cols
=
m_grid
->
GetSelectedCols
();
wxArrayInt
rows
=
m_grid
->
GetSelectedRows
();
DBG
(
printf
(
"topLeft.Count():%
zd botRight:Count():%zd
\n
"
,
topLeft
.
Count
(),
botRight
.
Count
(
)
);)
DBG
(
printf
(
"topLeft.Count():%
d botRight:Count():%d
\n
"
,
int
(
topLeft
.
Count
()
),
int
(
botRight
.
Count
()
)
);)
if
(
topLeft
.
Count
()
&&
botRight
.
Count
()
)
{
...
...
common/single_top.cpp
View file @
cf01c580
...
...
@@ -125,7 +125,7 @@ struct APP_SINGLE_TOP : public wxApp
{
wxLogError
(
wxT
(
"Unhandled exception class: %s what: %s"
),
GetChars
(
FROM_UTF8
(
typeid
(
e
).
name
()
)),
GetChars
(
FROM_UTF8
(
e
.
what
()
)
)
);
;
GetChars
(
FROM_UTF8
(
e
.
what
()
)
)
);
}
catch
(
const
IO_ERROR
&
ioe
)
{
...
...
@@ -158,7 +158,7 @@ struct APP_SINGLE_TOP : public wxApp
{
wxLogError
(
wxT
(
"Unhandled exception class: %s what: %s"
),
GetChars
(
FROM_UTF8
(
typeid
(
e
).
name
()
)),
GetChars
(
FROM_UTF8
(
e
.
what
()
)
)
);
;
GetChars
(
FROM_UTF8
(
e
.
what
()
)
)
);
}
catch
(
const
IO_ERROR
&
ioe
)
{
...
...
cvpcb/CMakeLists.txt
View file @
cf01c580
...
...
@@ -10,7 +10,6 @@ add_definitions( -DCVPCB )
if
(
KICAD_USE_WEBKIT AND BUILD_GITHUB_PLUGIN
)
set
(
WEBVIEWER_WXLIB
"webviewer"
)
add_definitions
(
-DKICAD_USE_WEBKIT
)
endif
()
...
...
cvpcb/autosel.cpp
View file @
cf01c580
...
...
@@ -218,7 +218,7 @@ void CVPCB_MAINFRAME::AutomaticFootprintMatching( wxCommandEvent& event )
bool
equ_is_unique
=
true
;
unsigned
next
=
idx
+
1
;
unsigned
previous
=
idx
-
1
;
int
previous
=
idx
-
1
;
if
(
next
<
equiv_List
.
size
()
&&
equivItem
.
m_ComponentValue
==
equiv_List
[
next
].
m_ComponentValue
)
...
...
cvpcb/readwrite_dlgs.cpp
View file @
cf01c580
...
...
@@ -306,7 +306,7 @@ bool CVPCB_MAINFRAME::ReadNetListAndLinkFiles()
if
(
component
->
GetFPID
().
IsLegacy
()
||
component
->
GetAltFPID
().
IsLegacy
())
continue
;
m_indexes
.
push_back
(
ii
);
;
m_indexes
.
push_back
(
ii
);
}
// If a n assignment conflict is found,
...
...
eeschema/class_libentry.cpp
View file @
cf01c580
...
...
@@ -1055,7 +1055,7 @@ bool LIB_PART::LoadFootprints( LINE_READER& aLineReader, wxString& aErrorMsg )
}
EDA_RECT
LIB_PART
::
GetBoundingBox
(
int
aUnit
,
int
aConvert
)
const
const
EDA_RECT
LIB_PART
::
GetBoundingBox
(
int
aUnit
,
int
aConvert
)
const
{
EDA_RECT
bBox
(
wxPoint
(
0
,
0
),
wxSize
(
0
,
0
)
);
...
...
@@ -1080,7 +1080,7 @@ EDA_RECT LIB_PART::GetBoundingBox( int aUnit, int aConvert ) const
}
EDA_RECT
LIB_PART
::
GetBodyBoundingBox
(
int
aUnit
,
int
aConvert
)
const
const
EDA_RECT
LIB_PART
::
GetBodyBoundingBox
(
int
aUnit
,
int
aConvert
)
const
{
EDA_RECT
bBox
(
wxPoint
(
0
,
0
),
wxSize
(
0
,
0
)
);
...
...
eeschema/class_libentry.h
View file @
cf01c580
...
...
@@ -296,7 +296,7 @@ public:
* if aConvert == 0 Convert is non used
* Invisible fields are not taken in account
**/
EDA_RECT
GetBoundingBox
(
int
aUnit
,
int
aConvert
)
const
;
const
EDA_RECT
GetBoundingBox
(
int
aUnit
,
int
aConvert
)
const
;
/**
* Function GetBodyBoundingBox
...
...
@@ -307,7 +307,7 @@ public:
* if aConvert == 0 Convert is non used
* Fields are not taken in account
**/
EDA_RECT
GetBodyBoundingBox
(
int
aUnit
,
int
aConvert
)
const
;
const
EDA_RECT
GetBodyBoundingBox
(
int
aUnit
,
int
aConvert
)
const
;
/**
* Function SaveDateAndTime
...
...
eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp
View file @
cf01c580
...
...
@@ -550,7 +550,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::initBuffers()
if
(
!
it
->
m_Visible
)
fld
.
SetVisible
(
false
);
else
fld
.
SetVisible
(
true
);
;
fld
.
SetVisible
(
true
);
}
else
{
...
...
eeschema/dialogs/dialog_lib_edit_pin.cpp
View file @
cf01c580
...
...
@@ -118,14 +118,14 @@ void DIALOG_LIB_EDIT_PIN::OnPropertiesChange( wxCommandEvent& event )
if
(
!
IsShown
()
)
// do nothing at init time
return
;
int
pinNameSize
=
ValueFromString
(
g_UserUnit
,
GetNameTextSize
()
);
int
pinNameSize
=
ValueFromString
(
g_UserUnit
,
Get
Pin
NameTextSize
()
);
int
pinNumSize
=
ValueFromString
(
g_UserUnit
,
GetPadNameTextSize
());
int
pinOrient
=
LIB_PIN
::
GetOrientationCode
(
GetOrientation
()
);
int
pinLength
=
ValueFromString
(
g_UserUnit
,
GetLength
()
);
int
pinShape
=
LIB_PIN
::
GetStyleCode
(
GetStyle
()
);
int
pinType
=
GetElectricalType
();
m_dummyPin
->
SetName
(
GetName
()
);
m_dummyPin
->
SetName
(
Get
Pin
Name
()
);
m_dummyPin
->
SetNameTextSize
(
pinNameSize
);
m_dummyPin
->
SetNumber
(
GetPadName
()
);
m_dummyPin
->
SetNumberTextSize
(
pinNumSize
);
...
...
eeschema/dialogs/dialog_lib_edit_pin.h
View file @
cf01c580
...
...
@@ -71,19 +71,19 @@ public:
void
SetStyle
(
int
style
)
{
m_choiceStyle
->
SetSelection
(
style
);
}
int
GetStyle
(
void
)
{
return
m_choiceStyle
->
GetSelection
();
}
void
SetName
(
const
wxString
&
name
)
{
m_textPinName
->
SetValue
(
name
);
}
wxString
GetName
(
void
)
{
return
m_textPinName
->
GetValue
();
}
void
Set
Pin
Name
(
const
wxString
&
name
)
{
m_textPinName
->
SetValue
(
name
);
}
wxString
Get
Pin
Name
(
void
)
{
return
m_textPinName
->
GetValue
();
}
void
SetNameTextSize
(
const
wxString
&
size
)
void
Set
Pin
NameTextSize
(
const
wxString
&
size
)
{
m_textPinNameTextSize
->
SetValue
(
size
);
}
wxString
GetNameTextSize
(
void
)
wxString
Get
Pin
NameTextSize
(
void
)
{
return
m_textPinNameTextSize
->
GetValue
();
}
void
SetNameTextSizeUnits
(
const
wxString
&
units
)
void
Set
Pin
NameTextSizeUnits
(
const
wxString
&
units
)
{
m_staticNameTextSizeUnits
->
SetLabel
(
units
);
}
...
...
eeschema/lib_pin.cpp
View file @
cf01c580
...
...
@@ -1919,38 +1919,44 @@ void LIB_PIN::SetWidth( int aWidth )
void
LIB_PIN
::
GetMsgPanelInfo
(
MSG_PANEL_ITEMS
&
aList
)
{
wxString
T
ext
;
wxString
t
ext
;
LIB_ITEM
::
GetMsgPanelInfo
(
aList
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Name"
),
m_name
,
DARKCYAN
)
);
if
(
m_number
==
0
)
T
ext
=
wxT
(
"?"
);
t
ext
=
wxT
(
"?"
);
else
PinStringNum
(
T
ext
);
PinStringNum
(
t
ext
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Number"
),
T
ext
,
DARKCYAN
)
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Number"
),
t
ext
,
DARKCYAN
)
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Type"
),
wxGetTranslation
(
pin_electrical_type_names
[
m_type
]
),
RED
)
);
Text
=
wxGetTranslation
(
pin_style_names
[
GetStyleCodeIndex
(
m_shape
)
]
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Style"
),
Text
,
BLUE
)
);
int
styleCodeIndex
=
GetStyleCodeIndex
(
m_shape
);
if
(
styleCodeIndex
>=
0
)
text
=
wxGetTranslation
(
pin_style_names
[
styleCodeIndex
]
);
else
text
=
wxT
(
"?"
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Style"
),
text
,
BLUE
)
);
if
(
IsVisible
()
)
T
ext
=
_
(
"Yes"
);
t
ext
=
_
(
"Yes"
);
else
T
ext
=
_
(
"No"
);
t
ext
=
_
(
"No"
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Visible"
),
T
ext
,
DARKGREEN
)
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Visible"
),
t
ext
,
DARKGREEN
)
);
// Display pin length
T
ext
=
StringFromValue
(
g_UserUnit
,
m_length
,
true
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Length"
),
T
ext
,
MAGENTA
)
);
t
ext
=
StringFromValue
(
g_UserUnit
,
m_length
,
true
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Length"
),
t
ext
,
MAGENTA
)
);
T
ext
=
wxGetTranslation
(
pin_orientation_names
[
GetOrientationCodeIndex
(
m_orientation
)
]
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Orientation"
),
T
ext
,
DARKMAGENTA
)
);
t
ext
=
wxGetTranslation
(
pin_orientation_names
[
GetOrientationCodeIndex
(
m_orientation
)
]
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Orientation"
),
t
ext
,
DARKMAGENTA
)
);
}
...
...
@@ -2201,11 +2207,18 @@ BITMAP_DEF LIB_PIN::GetMenuImage() const
wxString
LIB_PIN
::
GetSelectMenuText
()
const
{
wxString
tmp
;
wxString
style
;
int
styleCode
=
GetStyleCodeIndex
(
m_shape
);
if
(
styleCode
>=
0
)
style
=
wxGetTranslation
(
pin_style_names
[
styleCode
]
);
else
style
=
wxT
(
"?"
);
tmp
.
Printf
(
_
(
"Pin %s, %s, %s"
),
GetChars
(
GetNumberString
()
),
GetChars
(
GetTypeString
()
),
GetChars
(
wxGetTranslation
(
pin_style_names
[
GetStyleCodeIndex
(
m_shape
)
]
)
)
GetChars
(
style
)
);
return
tmp
;
}
...
...
eeschema/pinedit.cpp
View file @
cf01c580
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004 Jean-Pierre Charras, j
aen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2004 Jean-Pierre Charras, j
p.charras at wanadoo.fr
* Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors.
*
...
...
@@ -110,9 +110,9 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
dlg
.
SetElectricalTypeList
(
LIB_PIN
::
GetElectricalTypeNames
(),
LIB_PIN
::
GetElectricalTypeSymbols
()
);
dlg
.
SetElectricalType
(
pin
->
GetType
()
);
dlg
.
SetName
(
pin
->
GetName
()
);
dlg
.
SetNameTextSize
(
StringFromValue
(
g_UserUnit
,
pin
->
GetNameTextSize
()
)
);
dlg
.
SetNameTextSizeUnits
(
units
);
dlg
.
Set
Pin
Name
(
pin
->
GetName
()
);
dlg
.
Set
Pin
NameTextSize
(
StringFromValue
(
g_UserUnit
,
pin
->
GetNameTextSize
()
)
);
dlg
.
Set
Pin
NameTextSizeUnits
(
units
);
dlg
.
SetPadName
(
pin
->
GetNumberString
()
);
dlg
.
SetPadNameTextSize
(
StringFromValue
(
g_UserUnit
,
pin
->
GetNumberTextSize
()
)
);
...
...
@@ -132,7 +132,6 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
dlg
.
Layout
();
dlg
.
Fit
();
dlg
.
SetMinSize
(
dlg
.
GetSize
()
);
// dlg.SetLastSizeAndPosition(); // done in DIALOG_SHIM::Show()
if
(
dlg
.
ShowModal
()
==
wxID_CANCEL
)
{
...
...
@@ -145,7 +144,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
}
// Save the pin properties to use for the next new pin.
LastPinNameSize
=
ValueFromString
(
g_UserUnit
,
dlg
.
GetNameTextSize
()
);
LastPinNameSize
=
ValueFromString
(
g_UserUnit
,
dlg
.
Get
Pin
NameTextSize
()
);
LastPinNumSize
=
ValueFromString
(
g_UserUnit
,
dlg
.
GetPadNameTextSize
()
);
LastPinOrient
=
LIB_PIN
::
GetOrientationCode
(
dlg
.
GetOrientation
()
);
LastPinLength
=
ValueFromString
(
g_UserUnit
,
dlg
.
GetLength
()
);
...
...
@@ -156,7 +155,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
LastPinVisible
=
dlg
.
GetVisible
();
pin
->
EnableEditMode
(
true
,
m_editPinsPerPartOrConvert
);
pin
->
SetName
(
dlg
.
GetName
()
);
pin
->
SetName
(
dlg
.
Get
Pin
Name
()
);
pin
->
SetNameTextSize
(
GetLastPinNameSize
()
);
pin
->
SetNumber
(
dlg
.
GetPadName
()
);
pin
->
SetNumberTextSize
(
GetLastPinNumSize
()
);
...
...
eeschema/sch_marker.cpp
View file @
cf01c580
...
...
@@ -125,22 +125,20 @@ void SCH_MARKER::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
}
bool
SCH_MARKER
::
Matches
(
wxFindReplaceData
&
aSearchData
,
wxPoint
*
aFindLocation
)
bool
SCH_MARKER
::
Matches
(
wxFindReplaceData
&
aSearchData
,
void
*
aAuxData
,
wxPoint
*
aFindLocation
)
{
if
(
!
SCH_ITEM
::
Matches
(
m_drc
.
GetMainText
(),
aSearchData
)
)
if
(
SCH_ITEM
::
Matches
(
m_drc
.
GetErrorText
(),
aSearchData
)
||
SCH_ITEM
::
Matches
(
m_drc
.
GetMainText
(),
aSearchData
)
||
SCH_ITEM
::
Matches
(
m_drc
.
GetAuxiliaryText
(),
aSearchData
)
)
{
if
(
SCH_ITEM
::
Matches
(
m_drc
.
GetAuxiliaryText
(),
aSearchData
)
)
{
if
(
aFindLocation
)
*
aFindLocation
=
m_Pos
;
return
true
;
}
return
false
;
if
(
aFindLocation
)
*
aFindLocation
=
m_Pos
;
return
true
;
}
if
(
aFindLocation
)
*
aFindLocation
=
m_Pos
;
return
true
;
return
false
;
}
...
...
eeschema/sch_marker.h
View file @
cf01c580
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 20
04 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2004-201
1
KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 20
15 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2004-201
5
KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -89,13 +89,16 @@ public:
void
Rotate
(
wxPoint
aPosition
);
/**
* Function Matches, virtual from the base class EDA_ITEM
* Compare DRC marker main and auxiliary text against search string.
*
* @param aSearchData - Criteria to search against.
* @param aAuxData A pointer to optional data required for the search or NULL
* if not used.
* @param aFindLocation - a wxPoint where to put the location of matched item. can be NULL.
* @return True if the DRC main or auxiliary text matches the search criteria.
*/
bool
Matches
(
wxFindReplaceData
&
aSearchData
,
wxPoint
*
aFindLocation
);
bool
Matches
(
wxFindReplaceData
&
aSearchData
,
void
*
aAuxData
,
wxPoint
*
aFindLocation
);
void
GetMsgPanelInfo
(
std
::
vector
<
MSG_PANEL_ITEM
>&
aList
);
...
...
gerbview/class_gerbview_layer_widget.cpp
View file @
cf01c580
...
...
@@ -172,7 +172,7 @@ void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )
{
int
rowCount
;
int
menuId
=
event
.
GetId
();
bool
visible
=
(
menuId
==
ID_SHOW_ALL_LAYERS
)
?
true
:
false
;
;
bool
visible
=
(
menuId
==
ID_SHOW_ALL_LAYERS
)
?
true
:
false
;
long
visibleLayers
=
0
;
bool
force_active_layer_visible
;
...
...
gerbview/export_to_pcbnew.cpp
View file @
cf01c580
...
...
@@ -172,7 +172,7 @@ void GERBVIEW_FRAME::ExportDataInPcbnewFormat( wxCommandEvent& event )
}
wxString
fileName
;
wxString
path
=
wxGetCwd
();
;
wxString
path
=
wxGetCwd
();
wxFileDialog
filedlg
(
this
,
_
(
"Board file name:"
),
path
,
fileName
,
PcbFileWildcard
,
...
...
gerbview/gerbview_frame.cpp
View file @
cf01c580
...
...
@@ -269,11 +269,6 @@ void GERBVIEW_FRAME::LoadSettings( wxConfigBase* aCfg )
aCfg
->
SetPath
(
wxT
(
"drl_files"
)
);
m_drillFileHistory
.
Load
(
*
aCfg
);
aCfg
->
SetPath
(
wxT
(
".."
)
);
// WxWidgets 2.9.1 seems call setlocale( LC_NUMERIC, "" )
// when reading doubles in config,
// but forget to back to current locale. So we call SetLocaleTo_Default
SetLocaleTo_Default
();
}
...
...
include/base_struct.h
View file @
cf01c580
...
...
@@ -186,7 +186,7 @@ protected:
private
:
void
I
nitVars
();
void
i
nitVars
();
public
:
...
...
@@ -428,6 +428,7 @@ public:
/**
* Function Matches
* compares \a aText against search criteria in \a aSearchData.
* Helper function used in search and replace dialog
*
* @param aText A reference to a wxString object containing the string to test.
* @param aSearchData The criteria to search against.
...
...
include/class_bitmap_base.h
View file @
cf01c580
...
...
@@ -140,9 +140,9 @@ public: BITMAP_BASE( const wxPoint& pos = wxPoint( 0, 0 ) );
* schematic coordinate system. It is OK to overestimate the size
* by a few counts.
*/
EDA_RECT
GetBoundingBox
()
const
;
const
EDA_RECT
GetBoundingBox
()
const
;
void
DrawBitmap
(
EDA_DRAW_PANEL
*
aPanel
,
wxDC
*
aDC
,
const
wxPoint
&
aPos
);
void
DrawBitmap
(
EDA_DRAW_PANEL
*
aPanel
,
wxDC
*
aDC
,
const
wxPoint
&
aPos
);
/**
* Function ReadImageFile
...
...
include/class_title_block.h
View file @
cf01c580
...
...
@@ -64,7 +64,7 @@ public:
const
wxString
&
GetTitle
()
const
{
return
getTbText
(
titleIdx
);
;
return
getTbText
(
titleIdx
);
}
/**
...
...
include/wxstruct.h
View file @
cf01c580
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-201
1
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2009
-2015
Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2011
-2015
Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-201
5
KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -118,7 +118,6 @@ protected:
wxSize
m_FrameSize
;
wxAuiToolBar
*
m_mainToolBar
;
///< Standard horizontal Toolbar
bool
m_FrameIsActive
;
wxString
m_FrameName
;
///< name used for writing and reading setup
///< It is "SchematicFrame", "PcbFrame" ....
wxString
m_AboutTitle
;
///< Name of program displayed in About.
...
...
@@ -200,8 +199,6 @@ public:
wxString
GetName
()
const
{
return
m_FrameName
;
}
bool
IsActive
()
const
{
return
m_FrameIsActive
;
}
bool
IsType
(
FRAME_T
aType
)
const
{
return
m_Ident
==
aType
;
}
void
GetKicadHelp
(
wxCommandEvent
&
event
);
...
...
kicad/kicad.cpp
View file @
cf01c580
...
...
@@ -271,7 +271,7 @@ struct APP_KICAD : public wxApp
{
wxLogError
(
wxT
(
"Unhandled exception class: %s what: %s"
),
GetChars
(
FROM_UTF8
(
typeid
(
e
).
name
()
)),
GetChars
(
FROM_UTF8
(
e
.
what
()
)
)
);
;
GetChars
(
FROM_UTF8
(
e
.
what
()
)
)
);
}
catch
(
const
IO_ERROR
&
ioe
)
{
...
...
pagelayout_editor/class_pl_editor_layout.h
View file @
cf01c580
...
...
@@ -84,7 +84,7 @@ public:
* may be called soon after ComputeBoundingBox() to return the same EDA_RECT,
* as long as the CLASS_PL_EDITOR_LAYOUT has not changed.
*/
EDA_RECT
GetBoundingBox
()
const
{
return
m_BoundingBox
;
}
// override
const
EDA_RECT
GetBoundingBox
()
const
{
return
m_BoundingBox
;
}
// override
void
SetBoundingBox
(
const
EDA_RECT
&
aBox
)
{
m_BoundingBox
=
aBox
;
}
...
...
pagelayout_editor/properties_frame.cpp
View file @
cf01c580
...
...
@@ -198,7 +198,7 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( WORKSHEET_DATAITEM* aItem )
WORKSHEET_DATAITEM_TEXT
*
item
=
(
WORKSHEET_DATAITEM_TEXT
*
)
aItem
;
item
->
m_FullText
=
item
->
m_TextBase
;
// Replace our '\' 'n' sequence by the EOL char
item
->
ReplaceAntiSlashSequence
();
;
item
->
ReplaceAntiSlashSequence
();
m_textCtrlText
->
SetValue
(
item
->
m_FullText
);
msg
.
Printf
(
wxT
(
"%d"
),
item
->
m_IncrementLabel
);
...
...
pcb_calculator/attenuators.cpp
View file @
cf01c580
...
...
@@ -5,7 +5,7 @@
/*
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C)
1
2011 jean-pierre.charras
* Copyright (C) 2011 jean-pierre.charras
* Copyright (C) 2011 Kicad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -83,10 +83,12 @@ void PCB_CALCULATOR_FRAME::TransfAttenuatorDataToPanel()
m_AttValueCtrl
->
Enable
(
m_currAttenuator
->
m_Attenuation_Enable
);
m_ZinValueCtrl
->
Enable
(
m_currAttenuator
->
m_Zin_Enable
);
if
(
m_currAttenuator
->
m_Zin_Enable
)
msg
.
Printf
(
wxT
(
"%g"
),
m_currAttenuator
->
m_Zin
);
else
msg
.
Clear
();;
msg
.
Clear
();
m_ZinValueCtrl
->
SetValue
(
msg
);
msg
.
Printf
(
wxT
(
"%g"
),
m_currAttenuator
->
m_Zout
);
...
...
pcbnew/CMakeLists.txt
View file @
cf01c580
...
...
@@ -373,7 +373,6 @@ endif()
if
(
KICAD_USE_WEBKIT AND BUILD_GITHUB_PLUGIN
)
set
(
WEBVIEWER_WXLIB
"webviewer"
)
add_definitions
(
-DKICAD_USE_WEBKIT
)
endif
()
...
...
pcbnew/autorouter/auto_place_footprints.cpp
View file @
cf01c580
...
...
@@ -652,8 +652,7 @@ int getOptimalModulePlacement( PCB_EDIT_FRAME* aFrame, MODULE* aModule, wxDC* aD
CurrPosition
=
initialPos
;
// Undraw the current footprint
g_Offset_Module
=
wxPoint
(
0
,
0
);
DrawModuleOutlines
(
aFrame
->
GetCanvas
(),
aDC
,
aModule
);
aModule
->
DrawOutlinesWhenMoving
(
aFrame
->
GetCanvas
(),
aDC
,
wxPoint
(
0
,
0
)
);
g_Offset_Module
=
mod_pos
-
CurrPosition
;
...
...
pcbnew/basepcbframe.cpp
View file @
cf01c580
...
...
@@ -767,11 +767,6 @@ void PCB_BASE_FRAME::LoadSettings( wxConfigBase* aCfg )
if
(
m_DisplayOptions
.
m_DisplayModText
<
LINE
||
m_DisplayOptions
.
m_DisplayModText
>
SKETCH
)
m_DisplayOptions
.
m_DisplayModText
=
FILLED
;
// WxWidgets 2.9.1 seems call setlocale( LC_NUMERIC, "" )
// when reading doubles in config,
// but forget to back to current locale. So we call SetLocaleTo_Default
SetLocaleTo_Default
(
);
}
...
...
pcbnew/block.cpp
View file @
cf01c580
...
...
@@ -532,7 +532,7 @@ static void drawPickedItems( EDA_DRAW_PANEL* aPanel, wxDC* aDC, wxPoint aOffset
{
case
PCB_MODULE_T
:
frame
->
GetBoard
()
->
m_Status_Pcb
&=
~
RATSNEST_ITEM_LOCAL_OK
;
DrawModuleOutlines
(
aPanel
,
aDC
,
(
MODULE
*
)
item
);
((
MODULE
*
)
item
)
->
DrawOutlinesWhenMoving
(
aPanel
,
aDC
,
g_Offset_Module
);
break
;
case
PCB_LINE_T
:
...
...
pcbnew/class_board.cpp
View file @
cf01c580
...
...
@@ -6,11 +6,11 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 201
2 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble
.fr
* Copyright (C) 201
5 Jean-Pierre Charras, jp.charras at wanadoo
.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
*
* Copyright (C) 1992-201
2
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-201
5
KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -1212,10 +1212,12 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR* inspector, const void* testData,
NETINFO_ITEM
*
BOARD
::
FindNet
(
int
aNetcode
)
const
{
// the first valid netcode is 1 and the last is m_NetInfo.GetCount()-1.
// zero is reserved for "no connection" and is not
used
.
// zero is reserved for "no connection" and is not
actually a net
.
// NULL is returned for non valid netcodes
if
(
aNetcode
==
NETINFO_LIST
::
UNCONNECTED
)
wxASSERT
(
m_NetInfo
.
GetNetCount
()
>
0
);
// net zero should exist
if
(
aNetcode
==
NETINFO_LIST
::
UNCONNECTED
&&
m_NetInfo
.
GetNetCount
()
==
0
)
return
&
NETINFO_LIST
::
ORPHANED
;
else
return
m_NetInfo
.
GetNetItem
(
aNetcode
);
...
...
@@ -2459,14 +2461,14 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
}
}
// We need the pad list, for next tests.
// padlist is the list of pads, sorted by netname.
BuildListOfNets
();
std
::
vector
<
D_PAD
*>
padlist
=
GetPads
();
// If needed, remove the single pad nets:
if
(
aDeleteSinglePadNets
&&
!
aNetlist
.
IsDryRun
()
)
{
BuildListOfNets
();
std
::
vector
<
D_PAD
*>
padlist
=
GetPads
();
// padlist is the list of pads, sorted by netname.
int
count
=
0
;
wxString
netname
;
D_PAD
*
pad
=
NULL
;
...
...
@@ -2483,17 +2485,41 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
{
if
(
previouspad
&&
count
==
1
)
{
if
(
aReporter
&&
aReporter
->
ReportAll
()
)
// First, see if we have a copper zone attached to this pad.
// If so, this is not really a single pad net
for
(
int
ii
=
0
;
ii
<
GetAreaCount
();
ii
++
)
{
msg
.
Printf
(
_
(
"Remove single pad net
\"
%s
\"
on
\"
%s
\"
pad '%s'
\n
"
),
GetChars
(
previouspad
->
GetNetname
()
),
GetChars
(
previouspad
->
GetParent
()
->
GetReference
()
),
GetChars
(
previouspad
->
GetPadName
()
)
);
aReporter
->
Report
(
msg
);
ZONE_CONTAINER
*
zone
=
GetArea
(
ii
);
if
(
!
zone
->
IsOnCopperLayer
()
)
continue
;
if
(
zone
->
GetIsKeepout
()
)
continue
;
if
(
zone
->
GetNet
()
==
previouspad
->
GetNet
()
)
{
count
++
;
break
;
}
}
previouspad
->
SetNetCode
(
NETINFO_LIST
::
UNCONNECTED
);
if
(
count
==
1
)
// Really one pad, and nothing else
{
if
(
aReporter
&&
aReporter
->
ReportAll
()
)
{
msg
.
Printf
(
_
(
"Remove single pad net
\"
%s
\"
on
\"
%s
\"
pad '%s'
\n
"
),
GetChars
(
previouspad
->
GetNetname
()
),
GetChars
(
previouspad
->
GetParent
()
->
GetReference
()
),
GetChars
(
previouspad
->
GetPadName
()
)
);
aReporter
->
Report
(
msg
);
}
previouspad
->
SetNetCode
(
NETINFO_LIST
::
UNCONNECTED
);
}
}
netname
=
pad
->
GetNetname
();
count
=
1
;
}
...
...
@@ -2515,6 +2541,10 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
// They should exist in footprints, otherwise the footprint is wrong
// note also references or time stamps are updated, so we use only
// the reference to find a footprint
//
// Also verify if zones have acceptable nets, i.e. nets with pads.
// Zone with no pad belongs to a "dead" net which happens after changes in schematic
// when no more pad use this net name.
if
(
aReporter
&&
aReporter
->
ReportErrors
()
)
{
wxString
padname
;
...
...
@@ -2543,6 +2573,22 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
aReporter
->
Report
(
msg
);
}
}
// Test copper zones to detect "dead" nets (nets without any pad):
for
(
int
ii
=
0
;
ii
<
GetAreaCount
();
ii
++
)
{
ZONE_CONTAINER
*
zone
=
GetArea
(
ii
);
if
(
!
zone
->
IsOnCopperLayer
()
||
zone
->
GetIsKeepout
()
)
continue
;
if
(
zone
->
GetNet
()
->
GetNodesCount
()
==
0
)
{
msg
.
Printf
(
_
(
"* Warning: copper zone (net name '%s'): net has no pad*
\n
"
),
GetChars
(
zone
->
GetNet
()
->
GetNetname
()
)
);
aReporter
->
Report
(
msg
);
}
}
}
}
...
...
pcbnew/class_board_connected_item.cpp
View file @
cf01c580
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 201
2 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble
.fr
* Copyright (C) 201
5 Jean-Pierre Charras, jp.charras at wanadoo
.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 1992-201
2
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-201
5
KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -50,10 +50,10 @@ BOARD_CONNECTED_ITEM::BOARD_CONNECTED_ITEM( const BOARD_CONNECTED_ITEM& aItem )
void
BOARD_CONNECTED_ITEM
::
SetNetCode
(
int
aNetCode
)
{
assert
(
aNetCode
>=
0
);
//
assert( aNetCode >= 0 );
BOARD
*
board
=
GetBoard
();
if
(
board
)
if
(
(
aNetCode
>=
0
)
&&
board
)
m_netinfo
=
board
->
FindNet
(
aNetCode
);
else
m_netinfo
=
&
NETINFO_LIST
::
ORPHANED
;
...
...
pcbnew/class_drc_item.cpp
View file @
cf01c580
...
...
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2007 Dick Hollenbeck, dick@softplc.com
* Copyright (C) 20
07
KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 20
15
KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -75,8 +75,10 @@ wxString DRC_ITEM::GetErrorText() const
return
wxString
(
_
(
"Copper area inside copper area"
)
);
case
COPPERAREA_CLOSE_TO_COPPERAREA
:
return
wxString
(
_
(
"Copper areas intersect or are too close"
)
);
case
DRCE_NON_EXISTANT_NET_FOR_ZONE_OUTLINE
:
return
wxString
(
_
(
"Copper area has a nonexistent net name"
)
);
case
DRCE_SUSPICIOUS_NET_FOR_ZONE_OUTLINE
:
return
wxString
(
_
(
"Copper area belongs a net which has no pads. This is strange"
)
);
case
DRCE_HOLE_NEAR_PAD
:
return
wxString
(
_
(
"Hole near pad"
)
);
case
DRCE_HOLE_NEAR_TRACK
:
...
...
pcbnew/class_module.cpp
View file @
cf01c580
...
...
@@ -45,7 +45,6 @@
#include <3d_struct.h>
#include <msgpanel.h>
#include <drag.h>
#include <class_board.h>
#include <class_edge_mod.h>
#include <class_module.h>
...
...
pcbnew/class_module.h
View file @
cf01c580
...
...
@@ -280,6 +280,18 @@ public:
GR_DRAWMODE
aDrawMode
,
const
wxPoint
&
aOffset
=
ZeroOffset
);
/**
* Function DrawOutlinesWhenMoving
* draws in XOR mode the footprint when moving it to the \a aDC.
* To speed up the drawing, only a simplified shape is drawn
* @param aPanel = draw panel, Used to know the clip box
* @param aDC = Current Device Context
* @param aMoveVector = the offset between the curr position and
* the draw position.
*/
void
DrawOutlinesWhenMoving
(
EDA_DRAW_PANEL
*
aPanel
,
wxDC
*
aDC
,
const
wxPoint
&
aMoveVector
);
/**
* function ReadandInsert3DComponentShape
* read the 3D component shape(s) of the footprint (physical shape)
...
...
pcbnew/class_netinfo.h
View file @
cf01c580
...
...
@@ -320,7 +320,7 @@ public:
return
NULL
;
}
///> Constant that holds the unconnected net number
///> Constant that holds the unconnected net number
(typically 0)
static
const
int
UNCONNECTED
;
///> NETINFO_ITEM meaning that there was no net assigned for an item, as there was no
...
...
pcbnew/class_netinfo_item.cpp
View file @
cf01c580
...
...
@@ -80,10 +80,7 @@ void NETINFO_ITEM::Draw( EDA_DRAW_PANEL* panel,
void
NETINFO_ITEM
::
GetMsgPanelInfo
(
std
::
vector
<
MSG_PANEL_ITEM
>&
aList
)
{
int
count
;
wxString
txt
;
MODULE
*
module
;
D_PAD
*
pad
;
double
lengthnet
=
0.0
;
// This is the lenght of tracks on pcb
double
lengthPadToDie
=
0.0
;
// this is the lenght of internal ICs connections
...
...
@@ -92,12 +89,17 @@ void NETINFO_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
txt
.
Printf
(
wxT
(
"%d"
),
GetNet
()
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Net Code"
),
txt
,
RED
)
);
count
=
0
;
module
=
m_parent
->
GetBoard
()
->
m_Modules
;
// Warning: for netcode == NETINFO_LIST::ORPHANED, the parent or the board
// can be NULL
BOARD
*
board
=
m_parent
?
m_parent
->
GetBoard
()
:
NULL
;
if
(
board
==
NULL
)
return
;
for
(
;
module
!=
0
;
module
=
module
->
Next
()
)
int
count
=
0
;
for
(
MODULE
*
module
=
board
->
m_Modules
;
module
!=
NULL
;
module
=
module
->
Next
()
)
{
for
(
pad
=
module
->
Pads
();
pad
!=
0
;
pad
=
pad
->
Next
()
)
for
(
D_PAD
*
pad
=
module
->
Pads
();
pad
!=
0
;
pad
=
pad
->
Next
()
)
{
if
(
pad
->
GetNetCode
()
==
GetNet
()
)
{
...
...
@@ -112,7 +114,7 @@ void NETINFO_ITEM::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
count
=
0
;
for
(
const
TRACK
*
track
=
m_parent
->
GetBoard
()
->
m_Track
;
track
!=
NULL
;
track
=
track
->
Next
()
)
for
(
const
TRACK
*
track
=
board
->
m_Track
;
track
!=
NULL
;
track
=
track
->
Next
()
)
{
if
(
track
->
Type
()
==
PCB_VIA_T
)
{
...
...
pcbnew/class_pad.cpp
View file @
cf01c580
...
...
@@ -678,7 +678,7 @@ void D_PAD::GetOblongDrillGeometry( wxPoint& aStartPoint,
// of an equivalent segment which have the same position and width as the hole
int
delta_cx
,
delta_cy
;
wxSize
halfsize
=
GetDrillSize
();
;
wxSize
halfsize
=
GetDrillSize
();
halfsize
.
x
/=
2
;
halfsize
.
y
/=
2
;
...
...
pcbnew/class_pad.h
View file @
cf01c580
...
...
@@ -207,7 +207,7 @@ public:
void
TransformShapeWithClearanceToPolygon
(
CPOLYGONS_LIST
&
aCornerBuffer
,
int
aClearanceValue
,
int
aCircleToSegmentsCount
,
double
aCorrectionFactor
)
const
;
;
double
aCorrectionFactor
)
const
;
/**
* Function GetClearance
...
...
pcbnew/class_pcb_layer_widget.cpp
View file @
cf01c580
...
...
@@ -257,7 +257,7 @@ void PCB_LAYER_WIDGET::ReFillRender()
{
LAYER_WIDGET
::
ROW
renderRow
=
s_render_rows
[
row
];
if
(
!
isAllowedInFpMode
(
renderRow
.
id
)
)
if
(
m_fp_editor_mode
&&
!
isAllowedInFpMode
(
renderRow
.
id
)
)
continue
;
renderRow
.
tooltip
=
wxGetTranslation
(
s_render_rows
[
row
].
tooltip
);
...
...
@@ -284,7 +284,7 @@ void PCB_LAYER_WIDGET::SyncRenderStates()
{
int
rowId
=
s_render_rows
[
row
].
id
;
if
(
!
isAllowedInFpMode
(
rowId
)
)
if
(
m_fp_editor_mode
&&
!
isAllowedInFpMode
(
rowId
)
)
continue
;
// this does not fire a UI event
...
...
pcbnew/class_pcb_text.cpp
View file @
cf01c580
...
...
@@ -74,7 +74,7 @@ void TEXTE_PCB::Copy( TEXTE_PCB* source )
m_Bold
=
source
->
m_Bold
;
m_HJustify
=
source
->
m_HJustify
;
m_VJustify
=
source
->
m_VJustify
;
m_MultilineAllowed
=
m_MultilineAllowed
;
m_MultilineAllowed
=
source
->
m_MultilineAllowed
;
m_Text
=
source
->
m_Text
;
}
...
...
pcbnew/class_zone.cpp
View file @
cf01c580
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 201
2 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble
.fr
* Copyright (C) 201
5 Jean-Pierre Charras, jp.charras at wanadoo
.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 1992-201
2
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-201
5
KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -625,27 +625,21 @@ void ZONE_CONTAINER::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
{
if
(
GetNetCode
()
>=
0
)
{
NETINFO_ITEM
*
equipo
t
=
GetNet
();
NETINFO_ITEM
*
ne
t
=
GetNet
();
if
(
equipot
)
msg
=
equipot
->
GetNetname
();
else
msg
=
wxT
(
"<noname>"
);
}
else
// a netcode < 0 is an error
{
msg
=
wxT
(
" ["
);
msg
<<
GetNetname
()
+
wxT
(
"]"
);
msg
<<
wxT
(
" <"
)
<<
_
(
"Not Found"
)
<<
wxT
(
">"
);
if
(
net
)
msg
=
net
->
GetNetname
();
else
// Should not occur
msg
=
_
(
"<unknown>"
);
}
else
// a netcode < 0 is an error
msg
=
wxT
(
"<error>"
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"NetName"
),
msg
,
RED
)
);
#if 1
// Display net code : (useful in test or debug)
msg
.
Printf
(
wxT
(
"%d"
),
GetNetCode
()
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"NetCode"
),
msg
,
RED
)
);
#endif
// Display priority level
msg
.
Printf
(
wxT
(
"%d"
),
GetPriority
()
);
...
...
pcbnew/class_zone.h
View file @
cf01c580
...
...
@@ -2,8 +2,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 20
04 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 1992-201
1
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 20
15 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-201
5
KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -578,7 +578,6 @@ public:
void
SetDoNotAllowVias
(
bool
aEnable
)
{
m_doNotAllowVias
=
aEnable
;
}
void
SetDoNotAllowTracks
(
bool
aEnable
)
{
m_doNotAllowTracks
=
aEnable
;
}
#if defined(DEBUG)
virtual
void
Show
(
int
nestLevel
,
std
::
ostream
&
os
)
const
{
ShowDummy
(
os
);
}
// override
#endif
...
...
@@ -632,8 +631,8 @@ private:
/// The index of the corner being moved or -1 if no corner is selected.
int
m_CornerSelection
;
int
m_localFlgs
;
///< Flags
used in polygon calculations.
/// Variable
used in polygon calculations.
int
m_localFlgs
;
/** Segments used to fill the zone (#m_FillMode ==1 ), when fill zone by segment is used.
* In this case the segments have #m_ZoneMinThickness width.
...
...
pcbnew/cross-probing.cpp
View file @
cf01c580
...
...
@@ -45,6 +45,7 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
wxPoint
pos
;
strncpy
(
line
,
cmdline
,
sizeof
(
line
)
-
1
);
line
[
sizeof
(
line
)
-
1
]
=
0
;
idcmd
=
strtok
(
line
,
"
\n\r
"
);
text
=
strtok
(
NULL
,
"
\n\r
"
);
...
...
pcbnew/dialogs/dialog_design_rules.cpp
View file @
cf01c580
...
...
@@ -431,7 +431,7 @@ void DIALOG_DESIGN_RULES::InitializeRulesSelectionBoxes()
m_leftClassChoice
->
Select
(
0
);
m_buttonRightToLeft
->
Enable
(
false
);
m_buttonLeftToRight
->
Enable
(
false
);
;
m_buttonLeftToRight
->
Enable
(
false
);
FillListBoxWithNetNames
(
m_leftListCtrl
,
m_leftClassChoice
->
GetStringSelection
()
);
FillListBoxWithNetNames
(
m_rightListCtrl
,
m_rightClassChoice
->
GetStringSelection
()
);
...
...
@@ -821,7 +821,7 @@ void DIALOG_DESIGN_RULES::OnRightCBSelection( wxCommandEvent& event )
if
(
m_leftClassChoice
->
GetStringSelection
()
==
m_rightClassChoice
->
GetStringSelection
()
)
{
m_buttonRightToLeft
->
Enable
(
false
);
m_buttonLeftToRight
->
Enable
(
false
);
;
m_buttonLeftToRight
->
Enable
(
false
);
}
else
{
...
...
pcbnew/dialogs/dialog_freeroute_exchange.cpp
View file @
cf01c580
...
...
@@ -188,7 +188,7 @@ void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event )
command
=
value
+
wxFileName
::
GetPathSeparator
();
command
<<
wxT
(
"bin
\\
java"
);
#else // __WINDOWS__
command
=
wxT
(
"java"
);
;
command
=
wxT
(
"java"
);
#endif
command
<<
wxT
(
" -jar "
);
...
...
pcbnew/drag.h
View file @
cf01c580
...
...
@@ -49,10 +49,10 @@ class CONNECTIONS;
/*
* a DRAG_LIST manages the list of track segments to modify
* when the pad or the module is moving
* when the pad or the module is moving
in drag mode
*/
/*
/*
*
* a DRAG_SEGM_PICKER manage one track segment or a via
*/
class
DRAG_SEGM_PICKER
...
...
@@ -65,7 +65,7 @@ public:
D_PAD
*
m_Pad_End
;
// pointer to the moving pad
// if the end point should follow this pad
// or NULL
bool
m_Flag
;
// flag used in drag vias and drag track segment functions
int
m_TempFlags
;
// flag used in drag vias and drag track segment functions
private
:
double
m_RotationOffset
;
// initial orientation of the parent module
...
...
pcbnew/dragsegm.cpp
View file @
cf01c580
...
...
@@ -56,7 +56,7 @@ DRAG_SEGM_PICKER::DRAG_SEGM_PICKER( TRACK* aTrack )
m_endInitialValue
=
m_Track
->
GetEnd
();
m_Pad_Start
=
m_Track
->
GetState
(
START_ON_PAD
)
?
(
D_PAD
*
)
m_Track
->
start
:
NULL
;
m_Pad_End
=
m_Track
->
GetState
(
END_ON_PAD
)
?
(
D_PAD
*
)
m_Track
->
end
:
NULL
;
m_
Flag
=
0
;
m_
TempFlags
=
0
;
m_RotationOffset
=
0.0
;
m_Flipped
=
false
;
}
...
...
@@ -320,16 +320,16 @@ void AddSegmentToDragList( int flag, TRACK* aTrack )
DRAG_SEGM_PICKER
wrapper
(
aTrack
);
if
(
flag
&
STARTPOINT
)
wrapper
.
m_Flag
|=
1
;
if
(
flag
&
ENDPOINT
)
wrapper
.
m_Flag
|=
2
;
if
(
flag
&
STARTPOINT
)
{
wrapper
.
m_TempFlags
|=
STARTPOINT
;
aTrack
->
SetFlags
(
STARTPOINT
);
}
if
(
flag
&
ENDPOINT
)
{
wrapper
.
m_TempFlags
|=
ENDPOINT
;
aTrack
->
SetFlags
(
ENDPOINT
);
}
g_DragSegmentList
.
push_back
(
wrapper
);
}
...
...
@@ -411,10 +411,10 @@ void UndrawAndMarkSegmentsToDrag( EDA_DRAW_PANEL* aCanvas, wxDC* aDC )
track
->
SetState
(
IN_EDIT
,
false
);
track
->
SetFlags
(
IS_DRAGGED
);
if
(
g_DragSegmentList
[
ii
].
m_
Flag
&
STARTPOINT
)
if
(
g_DragSegmentList
[
ii
].
m_
TempFlags
&
STARTPOINT
)
track
->
SetFlags
(
STARTPOINT
);
if
(
g_DragSegmentList
[
ii
].
m_
Flag
&
ENDPOINT
)
if
(
g_DragSegmentList
[
ii
].
m_
TempFlags
&
ENDPOINT
)
track
->
SetFlags
(
ENDPOINT
);
track
->
Draw
(
aCanvas
,
aDC
,
GR_XOR
);
...
...
pcbnew/drc.cpp
View file @
cf01c580
...
...
@@ -2,9 +2,9 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004-201
4
Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2004-201
5
Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2014 Dick Hollenbeck, dick@softplc.com
* Copyright (C) 201
4
KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 201
5
KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -564,6 +564,10 @@ void DRC::testZones()
// if a netcode is < 0 the netname was not found when reading a netlist
// if a netcode is == 0 the netname is void, and the zone is not connected.
// This is allowed, but i am not sure this is a good idea
//
// In recent Pcbnew versions, the netcode is always >= 0, but an internal net name
// is stored, and initalized from the file or the zone properpies editor.
// if it differs from the net name from net code, there is a DRC issue
for
(
int
ii
=
0
;
ii
<
m_pcb
->
GetAreaCount
();
ii
++
)
{
ZONE_CONTAINER
*
test_area
=
m_pcb
->
GetArea
(
ii
);
...
...
@@ -571,13 +575,21 @@ void DRC::testZones()
if
(
!
test_area
->
IsOnCopperLayer
()
)
continue
;
if
(
test_area
->
GetNetCode
()
<
0
)
int
netcode
=
test_area
->
GetNetCode
();
// a netcode < 0 or > 0 and no pad in net is a error or strange
// perhaps a "dead" net, which happens when all pads in this net were removed
// Remark: a netcode < 0 should not happen (this is more a bug somewhere)
int
pads_in_net
=
(
test_area
->
GetNetCode
()
>
0
)
?
test_area
->
GetNet
()
->
GetNodesCount
()
:
1
;
if
(
(
netcode
<
0
)
||
pads_in_net
==
0
)
{
m_currentMarker
=
fillMarker
(
test_area
,
DRCE_
NON_EXISTANT
_NET_FOR_ZONE_OUTLINE
,
m_currentMarker
);
DRCE_
SUSPICIOUS
_NET_FOR_ZONE_OUTLINE
,
m_currentMarker
);
m_pcb
->
Add
(
m_currentMarker
);
m_mainWindow
->
GetGalCanvas
()
->
GetView
()
->
Add
(
m_currentMarker
);
m_currentMarker
=
0
;
m_currentMarker
=
NULL
;
}
}
...
...
pcbnew/drc_stuff.h
View file @
cf01c580
...
...
@@ -6,7 +6,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2007 Dick Hollenbeck, dick@softplc.com
* Copyright (C) 20
07
KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 20
15
KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -60,7 +60,7 @@
#define DRCE_MICRO_VIA_INCORRECT_LAYER_PAIR 21 ///< micro via's layer pair incorrect (layers must be adjacent)
#define COPPERAREA_INSIDE_COPPERAREA 22 ///< copper area outlines intersect
#define COPPERAREA_CLOSE_TO_COPPERAREA 23 ///< copper area outlines are too close
#define DRCE_
NON_EXISTANT_NET_FOR_ZONE_OUTLINE 24 ///< copper area outline has an incorrect netcode due to a netname not found
#define DRCE_
SUSPICIOUS_NET_FOR_ZONE_OUTLINE 24 ///< copper area has a net but no pads in nets, which is suspicious
#define DRCE_HOLE_NEAR_PAD 25 ///< hole too close to pad
#define DRCE_HOLE_NEAR_TRACK 26 ///< hole too close to track
#define DRCE_TOO_SMALL_TRACK_WIDTH 27 ///< Too small track width
...
...
pcbnew/footprint_wizard_frame.cpp
View file @
cf01c580
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 Miguel Angel Ajo Pelayo <miguelangel@nbee.es>
* Copyright (C) 2012 Jean-Pierre Charras, jaen-pierre.charras
* Copyright (C) 2008-201
1
Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-201
1
KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2012
-2015
Miguel Angel Ajo Pelayo <miguelangel@nbee.es>
* Copyright (C) 2012
-2015
Jean-Pierre Charras, jaen-pierre.charras
* Copyright (C) 2008-201
5
Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-201
5
KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -440,7 +440,7 @@ void FOOTPRINT_WIZARD_FRAME::OnActivate( wxActivateEvent& event )
EDA_DRAW_FRAME
::
OnActivate
(
event
);
// Ensure we do not have old selection:
if
(
!
m_FrameIsActive
)
if
(
!
event
.
GetActive
()
)
return
;
bool
footprintWizardsChanged
=
false
;
...
...
pcbnew/github/github_getliblist.cpp
View file @
cf01c580
...
...
@@ -101,7 +101,7 @@ bool GITHUB_GETLIBLIST::GetLibraryList( wxArrayString& aList )
// The URL lib names are relative to the server name.
// so add the server name to them.
wxURI
repo
(
m_repoURL
);
wxString
urlPrefix
=
wxT
(
"https://"
)
+
repo
.
GetServer
()
+
wxT
(
"/"
);
;
wxString
urlPrefix
=
wxT
(
"https://"
)
+
repo
.
GetServer
()
+
wxT
(
"/"
);
wxString
errorMsg
;
const
char
sep
=
','
;
// Separator fields, in json returned file
...
...
pcbnew/legacy_netlist_reader.cpp
View file @
cf01c580
...
...
@@ -185,6 +185,7 @@ void LEGACY_NETLIST_READER::loadNet( char* aText, COMPONENT* aComponent ) throw(
char
line
[
256
];
strncpy
(
line
,
aText
,
sizeof
(
line
)
);
line
[
sizeof
(
line
)
-
1
]
=
'\0'
;
if
(
(
p
=
strtok
(
line
,
" ()
\t\n
"
)
)
==
NULL
)
{
...
...
pcbnew/modules.cpp
View file @
cf01c580
...
...
@@ -24,7 +24,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
/*
*
* @file modules.cpp
*/
...
...
@@ -40,7 +40,6 @@
#include <class_module.h>
#include <pcbnew.h>
#include <protos.h>
#include <drag.h>
...
...
@@ -166,7 +165,7 @@ void Abort_MoveOrCopyModule( EDA_DRAW_PANEL* Panel, wxDC* DC )
if
(
module
)
{
// Erase the current footprint on screen
DrawModuleOutlines
(
Panel
,
DC
,
m
odule
);
module
->
DrawOutlinesWhenMoving
(
Panel
,
DC
,
g_Offset_M
odule
);
/* If a move command: return to old position
* If a copy command, delete the new footprint
...
...
@@ -239,12 +238,12 @@ void MoveFootprint( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
/* Erase current footprint. */
if
(
aErase
)
{
DrawModuleOutlines
(
aPanel
,
aDC
,
m
odule
);
module
->
DrawOutlinesWhenMoving
(
aPanel
,
aDC
,
g_Offset_M
odule
);
}
/* Redraw the module at the new position. */
g_Offset_Module
=
module
->
GetPosition
()
-
aPanel
->
GetParent
()
->
GetCrossHairPosition
();
DrawModuleOutlines
(
aPanel
,
aDC
,
m
odule
);
module
->
DrawOutlinesWhenMoving
(
aPanel
,
aDC
,
g_Offset_M
odule
);
DrawSegmentWhileMovingFootprint
(
aPanel
,
aDC
);
}
...
...
@@ -323,7 +322,7 @@ void PCB_EDIT_FRAME::Change_Side_Module( MODULE* Module, wxDC* DC )
/* Erase footprint and draw outline if it has been already drawn. */
if
(
DC
)
{
DrawModuleOutlines
(
m_canvas
,
DC
,
Module
);
Module
->
DrawOutlinesWhenMoving
(
m_canvas
,
DC
,
g_Offset_
Module
);
DrawSegmentWhileMovingFootprint
(
m_canvas
,
DC
);
}
}
...
...
@@ -347,7 +346,7 @@ void PCB_EDIT_FRAME::Change_Side_Module( MODULE* Module, wxDC* DC )
{
if
(
DC
)
{
DrawModuleOutlines
(
m_canvas
,
DC
,
Module
);
Module
->
DrawOutlinesWhenMoving
(
m_canvas
,
DC
,
g_Offset_
Module
);
DrawSegmentWhileMovingFootprint
(
m_canvas
,
DC
);
}
...
...
@@ -459,7 +458,7 @@ void PCB_BASE_FRAME::Rotate_Module( wxDC* DC, MODULE* module, double angle, bool
{
if
(
DC
)
{
DrawModuleOutlines
(
m_canvas
,
DC
,
m
odule
);
module
->
DrawOutlinesWhenMoving
(
m_canvas
,
DC
,
g_Offset_M
odule
);
DrawSegmentWhileMovingFootprint
(
m_canvas
,
DC
);
}
}
...
...
@@ -486,7 +485,7 @@ void PCB_BASE_FRAME::Rotate_Module( wxDC* DC, MODULE* module, double angle, bool
else
{
// Beiing moved: just redraw it
DrawModuleOutlines
(
m_canvas
,
DC
,
m
odule
);
module
->
DrawOutlinesWhenMoving
(
m_canvas
,
DC
,
g_Offset_M
odule
);
DrawSegmentWhileMovingFootprint
(
m_canvas
,
DC
);
}
...
...
@@ -496,35 +495,31 @@ void PCB_BASE_FRAME::Rotate_Module( wxDC* DC, MODULE* module, double angle, bool
}
/*************************************************/
/* Redraw in XOR mode the outlines of a module. */
/*************************************************/
void
DrawModuleOutlines
(
EDA_DRAW_PANEL
*
panel
,
wxDC
*
DC
,
MODULE
*
module
)
// Redraw in XOR mode the outlines of the module.
void
MODULE
::
DrawOutlinesWhenMoving
(
EDA_DRAW_PANEL
*
panel
,
wxDC
*
DC
,
const
wxPoint
&
aMoveVector
)
{
int
pad_fill_tmp
;
D_PAD
*
pt_pad
;
if
(
module
==
NULL
)
return
;
module
->
DrawEdgesOnly
(
panel
,
DC
,
g_Offset_Module
,
GR_XOR
);
DrawEdgesOnly
(
panel
,
DC
,
aMoveVector
,
GR_XOR
);
DISPLAY_OPTIONS
*
displ_opts
=
(
DISPLAY_OPTIONS
*
)
panel
->
GetDisplayOptions
();
// Show pads in sketch mode to speedu up drawings
pad_fill_tmp
=
displ_opts
->
m_DisplayPadFill
;
displ_opts
->
m_DisplayPadFill
=
true
;
pt_pad
=
module
->
Pads
();
pt_pad
=
Pads
();
for
(
;
pt_pad
!=
NULL
;
pt_pad
=
pt_pad
->
Next
()
)
pt_pad
->
Draw
(
panel
,
DC
,
GR_XOR
,
g_Offset_Module
);
pt_pad
->
Draw
(
panel
,
DC
,
GR_XOR
,
aMoveVector
);
displ_opts
->
m_DisplayPadFill
=
pad_fill_tmp
;
if
(
displ_opts
->
m_Show_Module_Ratsnest
&&
panel
)
if
(
displ_opts
->
m_Show_Module_Ratsnest
)
{
PCB_BASE_FRAME
*
frame
=
(
PCB_BASE_FRAME
*
)
panel
->
GetParent
();
frame
->
build_ratsnest_module
(
module
);
frame
->
build_ratsnest_module
(
this
);
frame
->
TraceModuleRatsNest
(
DC
);
}
}
pcbnew/modview_frame.cpp
View file @
cf01c580
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008-201
1
Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-201
2
KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2012
-2015
Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008-201
5
Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-201
5
KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -551,7 +551,7 @@ void FOOTPRINT_VIEWER_FRAME::OnActivate( wxActivateEvent& event )
EDA_DRAW_FRAME
::
OnActivate
(
event
);
// Ensure we do not have old selection:
if
(
!
m_FrameIsActive
)
if
(
!
event
.
GetActive
()
)
return
;
// Ensure we have the right library list:
...
...
pcbnew/pcb_parser.cpp
View file @
cf01c580
...
...
@@ -112,6 +112,17 @@ void PCB_PARSER::init()
}
void
PCB_PARSER
::
pushValueIntoMap
(
int
aIndex
,
int
aValue
)
{
// Add aValue in netcode mapping (m_netCodes) at index aNetCode
// ensure there is room in m_netCodes for that, and add room if needed.
if
(
(
int
)
m_netCodes
.
size
()
<=
aIndex
)
m_netCodes
.
resize
(
aIndex
+
1
);
m_netCodes
[
aIndex
]
=
aValue
;
}
double
PCB_PARSER
::
parseDouble
()
throw
(
IO_ERROR
)
{
char
*
tmp
;
...
...
@@ -1194,7 +1205,7 @@ void PCB_PARSER::parseNETINFO_ITEM() throw( IO_ERROR, PARSE_ERROR )
m_board
->
AppendNet
(
net
);
// Store the new code mapping
m_netCodes
[
netCode
]
=
net
->
GetNet
(
);
pushValueIntoMap
(
netCode
,
net
->
GetNet
()
);
}
}
...
...
@@ -2526,6 +2537,8 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR )
int
hatchPitch
=
Mils2iu
(
CPolyLine
::
GetDefaultHatchPitchMils
()
);
wxPoint
pt
;
T
token
;
int
tmp
;
wxString
netnameFromfile
;
// the zone net name find in file
// bigger scope since each filled_polygon is concatenated in here
CPOLYGONS_LIST
pts
;
...
...
@@ -2545,20 +2558,19 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR )
// Init the net code only, not the netname, to be sure
// the zone net name is the name read in file.
// (When mismatch, the user will be prompted in DRC, to fix the actual name)
zone
->
SetNetCode
(
getNetCode
(
parseInt
(
"net number"
)
)
);
tmp
=
getNetCode
(
parseInt
(
"net number"
)
);
if
(
tmp
<
0
)
tmp
=
0
;
zone
->
SetNetCode
(
tmp
);
NeedRIGHT
();
break
;
case
T_net_name
:
NeedSYMBOLorNUMBER
();
if
(
zone
->
GetNet
()
->
GetNetname
()
!=
FromUTF8
()
)
{
wxString
msg
;
msg
.
Printf
(
_
(
"There is a zone that belongs to a not existing net"
"(%s), you should verify it."
),
GetChars
(
FromUTF8
()
)
);
DisplayError
(
NULL
,
msg
);
zone
->
SetNetCode
(
NETINFO_LIST
::
UNCONNECTED
);
}
netnameFromfile
=
FromUTF8
();
NeedRIGHT
();
break
;
...
...
@@ -2829,10 +2841,45 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR )
if
(
pts
.
GetCornersCount
()
)
zone
->
AddFilledPolysList
(
pts
);
// Ensure keepout does not have a net (which have no sense for a keepout zone)
if
(
zone
->
GetIsKeepout
()
)
// Ensure keepout and non copper zones do not have a net
// (which have no sense for these zones)
// the netcode 0 is used for these zones
bool
zone_has_net
=
zone
->
IsOnCopperLayer
()
&&
!
zone
->
GetIsKeepout
();
if
(
!
zone_has_net
)
zone
->
SetNetCode
(
NETINFO_LIST
::
UNCONNECTED
);
// Ensure the zone net name is valid, and matches the net code, for copper zones
if
(
zone_has_net
&&
(
zone
->
GetNet
()
->
GetNetname
()
!=
netnameFromfile
)
)
{
// Can happens which old boards, with nonexistent nets ...
// or after being edited by hand
// We try to fix the mismatch.
NETINFO_ITEM
*
net
=
m_board
->
FindNet
(
netnameFromfile
);
if
(
net
)
// An existing net has the same net name. use it for the zone
zone
->
SetNetCode
(
net
->
GetNet
()
);
else
// Not existing net: add a new net to keep trace of the zone netname
{
int
newnetcode
=
m_board
->
GetNetCount
();
net
=
new
NETINFO_ITEM
(
m_board
,
netnameFromfile
,
newnetcode
);
m_board
->
AppendNet
(
net
);
// Store the new code mapping
pushValueIntoMap
(
newnetcode
,
net
->
GetNet
()
);
// and update the zone netcode
zone
->
SetNetCode
(
net
->
GetNet
()
);
// Prompt the user
wxString
msg
;
msg
.
Printf
(
_
(
"There is a zone that belongs to a not existing net
\n
"
"
\"
%s
\"\n
"
"you should verify and edit it (run DRC test)."
),
GetChars
(
netnameFromfile
)
);
DisplayError
(
NULL
,
msg
);
}
}
return
zone
.
release
();
}
...
...
pcbnew/pcb_parser.h
View file @
cf01c580
...
...
@@ -69,15 +69,24 @@ class PCB_PARSER : public PCB_LEXER
std
::
vector
<
int
>
m_netCodes
;
///< net codes mapping for boards being loaded
///> Converts net code using the mapping table if available,
///> otherwise returns unchanged net code
///> otherwise returns unchanged net code
if < 0 or if is is out of range
inline
int
getNetCode
(
int
aNetCode
)
{
if
(
aNetCode
<
(
int
)
m_netCodes
.
size
(
)
)
if
(
(
aNetCode
>=
0
)
&&
(
aNetCode
<
(
int
)
m_netCodes
.
size
()
)
)
return
m_netCodes
[
aNetCode
];
return
aNetCode
;
}
/**
* function pushValueIntoMap
* Add aValue value in netcode mapping (m_netCodes) at index aIndex
* ensure there is room in m_netCodes for that, and add room if needed.
* @param aIndex = the index ( expected >=0 )of the location to use in m_netCodes
* @param aValue = the netcode value to map
*/
void
pushValueIntoMap
(
int
aIndex
,
int
aValue
);
/**
* Function init
* clears and re-establishes m_layerMap with the default layer names.
...
...
pcbnew/pcbframe.cpp
View file @
cf01c580
...
...
@@ -754,11 +754,6 @@ void PCB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
aCfg
->
Read
(
PCB_MAGNETIC_TRACKS_OPT
,
&
g_MagneticTrackOption
);
aCfg
->
Read
(
SHOW_MICROWAVE_TOOLS
,
&
m_show_microwave_tools
);
aCfg
->
Read
(
SHOW_LAYER_MANAGER_TOOLS
,
&
m_show_layer_manager_tools
);
// WxWidgets 2.9.1 seems call setlocale( LC_NUMERIC, "" )
// when reading doubles in cfg,
// but forget to back to current locale. So we call SetLocaleTo_Default
SetLocaleTo_Default
(
);
}
...
...
pcbnew/protos.h
View file @
cf01c580
...
...
@@ -61,8 +61,6 @@ void DrawTraces( EDA_DRAW_PANEL* panel,
int
nbsegment
,
GR_DRAWMODE
mode_color
);
void
DrawModuleOutlines
(
EDA_DRAW_PANEL
*
panel
,
wxDC
*
DC
,
MODULE
*
module
);
void
ShowNewTrackWhenMovingCursor
(
EDA_DRAW_PANEL
*
aPanel
,
wxDC
*
aDC
,
const
wxPoint
&
aPosition
,
bool
aErase
);
...
...
pcbnew/ratsnest.cpp
View file @
cf01c580
...
...
@@ -883,7 +883,7 @@ void PCB_BASE_FRAME::BuildAirWiresTargetsList( BOARD_CONNECTED_ITEM* aItemRef,
if
(
track
->
GetNetCode
()
<
net_code
)
continue
;
if
(
track
->
GetNetCode
()
>
net_code
)
break
;
;
break
;
if
(
!
track
->
GetSubNet
()
||
(
track
->
GetSubNet
()
!=
subnet
)
)
{
...
...
pcbnew/specctra_test.cpp
View file @
cf01c580
...
...
@@ -51,7 +51,7 @@ int main( int argc, char** argv )
SPECCTRA_DB
db
;
bool
failed
=
false
;
SetLocaleTo_C_standard
(
);
// Switch the locale to standard C
LOCALE_IO
toggle
;
// Temporary switch the locale to standard C to r/w floats
if
(
argc
==
2
)
{
...
...
@@ -87,8 +87,6 @@ int main( int argc, char** argv )
DSN
::
SESSION
*
ses
=
db
.
GetSESSION
();
ses
->
Format
(
&
db
,
0
);
#endif
SetLocaleTo_Default
(
);
// revert to the current locale
}
//-----<dummy code>---------------------------------------------------
...
...
pcbnew/zones_by_polygon.cpp
View file @
cf01c580
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 201
2 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble
.fr
* Copyright (C) 201
5 Jean-Pierre Charras, jp.charras at wanadoo
.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-201
2
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-201
5
KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
polygon/PolyLine.cpp
View file @
cf01c580
...
...
@@ -611,7 +611,7 @@ int CPolyLine::GetEndContour( int ic )
}
EDA_RECT
CPolyLine
::
GetBoundingBox
()
const
EDA_RECT
CPolyLine
::
GetBoundingBox
()
{
int
xmin
=
INT_MAX
;
int
ymin
=
INT_MAX
;
...
...
@@ -634,7 +634,7 @@ EDA_RECT CPolyLine::GetBoundingBox()
}
EDA_RECT
CPolyLine
::
GetBoundingBox
(
int
icont
)
const
EDA_RECT
CPolyLine
::
GetBoundingBox
(
int
icont
)
{
int
xmin
=
INT_MAX
;
int
ymin
=
INT_MAX
;
...
...
polygon/PolyLine.h
View file @
cf01c580
...
...
@@ -355,14 +355,14 @@ public:
/**
* @return the full bounding box of polygons
*/
EDA_RECT
GetBoundingBox
();
const
EDA_RECT
GetBoundingBox
();
/**
* @return the bounding box of a given polygon
* @param icont = the index of the polygon contour
* (0 = main contour, 1 ... n = other contours, usually holes)
*/
EDA_RECT
GetBoundingBox
(
int
icont
);
const
EDA_RECT
GetBoundingBox
(
int
icont
);
void
Copy
(
const
CPolyLine
*
src
);
bool
TestPointInside
(
int
x
,
int
y
);
...
...
scripting/wx_python_helpers.cpp
View file @
cf01c580
...
...
@@ -186,6 +186,7 @@ PyObject* wx2PyString( const wxString& src )
void
wxSetDefaultPyEncoding
(
const
char
*
encoding
)
{
strncpy
(
wxPythonEncoding
,
encoding
,
WX_DEFAULTENCODING_SIZE
);
wxPythonEncoding
[
WX_DEFAULTENCODING_SIZE
-
1
]
=
'\0'
;
}
...
...
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