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
00ee6c7b
Commit
00ee6c7b
authored
Apr 25, 2013
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pcbnew, dialog SVG export: Fix Pcbnew crash when opening the dialog.
parent
d3f28fb7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
14 deletions
+21
-14
3d_draw_basic_functions.cpp
3d-viewer/3d_draw_basic_functions.cpp
+1
-1
dialog_SVG_print.cpp
pcbnew/dialogs/dialog_SVG_print.cpp
+5
-5
dialog_SVG_print_base.cpp
pcbnew/dialogs/dialog_SVG_print_base.cpp
+4
-1
dialog_SVG_print_base.h
pcbnew/dialogs/dialog_SVG_print_base.h
+3
-1
hotkeys_board_editor.cpp
pcbnew/hotkeys_board_editor.cpp
+8
-6
No files found.
3d-viewer/3d_draw_basic_functions.cpp
View file @
00ee6c7b
...
...
@@ -217,7 +217,7 @@ void Draw3D_SolidHorizontalPolyPolygons( const std::vector<CPolyPt>& aPolysList,
/* draw the solid polygon found in aPolysList
* The first polygon
j
is the main polygon, others are holes
* The first polygon is the main polygon, others are holes
* See Draw3D_SolidHorizontalPolyPolygons for more info
*/
void
Draw3D_SolidHorizontalPolygonWithHoles
(
const
std
::
vector
<
CPolyPt
>&
aPolysList
,
...
...
pcbnew/dialogs/dialog_SVG_print.cpp
View file @
00ee6c7b
...
...
@@ -118,11 +118,11 @@ void DIALOG_SVG_PRINT::initDialog()
// (Front or Top to Back or Bottom)
DECLARE_LAYERS_ORDER_LIST
(
layersOrder
);
for
(
LAYER_NUM
layer_idx
=
FIRST_LAYER
;
layer_idx
<
NB_LAYERS
;
++
layer_idx
)
for
(
LAYER_NUM
layer_idx
=
FIRST_LAYER
;
layer_idx
<
NB_
PCB_
LAYERS
;
++
layer_idx
)
{
layer
=
layersOrder
[
layer_idx
];
wxASSERT
(
layer
<
NB_LAYERS
);
wxASSERT
(
layer
<
NB_
PCB_
LAYERS
);
if
(
m_boxSelectLayer
[
layer
]
==
NULL
)
continue
;
...
...
@@ -148,7 +148,7 @@ void DIALOG_SVG_PRINT::initDialog()
{
wxString
layerKey
;
for
(
LAYER_NUM
layer
=
FIRST_LAYER
;
layer
<
NB_LAYERS
;
++
layer
)
for
(
LAYER_NUM
layer
=
FIRST_LAYER
;
layer
<
NB_
PCB_
LAYERS
;
++
layer
)
{
bool
option
;
...
...
@@ -237,7 +237,7 @@ void DIALOG_SVG_PRINT::ExportSVGFile( bool aOnlyOneFile )
// Build layers mask
LAYER_MSK
printMaskLayer
=
NO_LAYERS
;
for
(
LAYER_NUM
layer
=
FIRST_LAYER
;
layer
<
NB_LAYERS
;
++
layer
)
for
(
LAYER_NUM
layer
=
FIRST_LAYER
;
layer
<
NB_
PCB_
LAYERS
;
++
layer
)
{
if
(
m_boxSelectLayer
[
layer
]
&&
m_boxSelectLayer
[
layer
]
->
GetValue
()
)
printMaskLayer
|=
GetLayerMask
(
layer
);
...
...
@@ -363,7 +363,7 @@ void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event )
wxString
layerKey
;
for
(
LAYER_NUM
layer
=
FIRST_LAYER
;
layer
<
NB_LAYERS
;
++
layer
)
for
(
LAYER_NUM
layer
=
FIRST_LAYER
;
layer
<
NB_PCB_LAYERS
;
++
layer
)
{
if
(
m_boxSelectLayer
[
layer
]
==
NULL
)
continue
;
...
...
pcbnew/dialogs/dialog_SVG_print_base.cpp
View file @
00ee6c7b
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Apr 10
2012)
// C++ code generated with wxFormBuilder (version
Oct 8
2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -24,6 +24,7 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c
bSizer4
=
new
wxBoxSizer
(
wxHORIZONTAL
);
m_outputDirectoryName
=
new
wxTextCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_outputDirectoryName
->
SetMaxLength
(
0
);
m_outputDirectoryName
->
SetToolTip
(
_
(
"Enter a filename if you do not want to use default file names
\n
Can be used only when printing the current sheet"
)
);
m_outputDirectoryName
->
SetMinSize
(
wxSize
(
450
,
-
1
)
);
...
...
@@ -64,6 +65,7 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c
sbOptionsSizer
->
Add
(
m_TextPenWidth
,
0
,
wxRIGHT
|
wxLEFT
,
5
);
m_DialogDefaultPenSize
=
new
wxTextCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_DialogDefaultPenSize
->
SetMaxLength
(
0
);
sbOptionsSizer
->
Add
(
m_DialogDefaultPenSize
,
0
,
wxBOTTOM
|
wxRIGHT
|
wxLEFT
|
wxEXPAND
,
5
);
wxString
m_ModeColorOptionChoices
[]
=
{
_
(
"Color"
),
_
(
"Black and white"
)
};
...
...
@@ -118,6 +120,7 @@ DIALOG_SVG_PRINT_base::DIALOG_SVG_PRINT_base( wxWindow* parent, wxWindowID id, c
bMainSizer
->
Add
(
m_staticText2
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
m_messagesBox
=
new
wxTextCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
wxTE_MULTILINE
);
m_messagesBox
->
SetMaxLength
(
0
);
m_messagesBox
->
SetMinSize
(
wxSize
(
-
1
,
100
)
);
bMainSizer
->
Add
(
m_messagesBox
,
1
,
wxBOTTOM
|
wxRIGHT
|
wxLEFT
|
wxEXPAND
,
5
);
...
...
pcbnew/dialogs/dialog_SVG_print_base.h
View file @
00ee6c7b
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Apr 10
2012)
// C++ code generated with wxFormBuilder (version
Oct 8
2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -11,6 +11,8 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class
DIALOG_SHIM
;
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/stattext.h>
...
...
pcbnew/hotkeys_board_editor.cpp
View file @
00ee6c7b
...
...
@@ -170,8 +170,10 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
if
(
GetCanvas
()
->
IsMouseCaptured
()
)
GetCanvas
()
->
CallMouseCapture
(
aDC
,
wxDefaultPosition
,
false
);
GetBoard
()
->
SetTrackWidthIndex
(
(
GetBoard
()
->
GetTrackWidthIndex
()
+
1
)
%
GetBoard
()
->
m_TrackWidthList
.
size
()
);
if
(
GetBoard
()
->
GetTrackWidthIndex
()
<
GetBoard
()
->
m_TrackWidthList
.
size
()
-
1
)
GetBoard
()
->
SetTrackWidthIndex
(
GetBoard
()
->
GetTrackWidthIndex
()
+
1
);
else
GetBoard
()
->
SetTrackWidthIndex
(
0
);
if
(
GetCanvas
()
->
IsMouseCaptured
()
)
GetCanvas
()
->
CallMouseCapture
(
aDC
,
wxDefaultPosition
,
false
);
...
...
@@ -182,10 +184,10 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
if
(
GetCanvas
()
->
IsMouseCaptured
()
)
GetCanvas
()
->
CallMouseCapture
(
aDC
,
wxDefaultPosition
,
false
);
if
(
GetBoard
()
->
GetTrackWidthIndex
()
=
=
0
)
GetBoard
()
->
SetTrackWidthIndex
(
GetBoard
()
->
m_TrackWidthList
.
size
()
);
GetBoard
()
->
SetTrackWidthIndex
(
GetBoard
()
->
GetTrackWidthIndex
()
-
1
);
if
(
GetBoard
()
->
GetTrackWidthIndex
()
<
=
0
)
GetBoard
()
->
SetTrackWidthIndex
(
GetBoard
()
->
m_TrackWidthList
.
size
()
-
1
);
else
GetBoard
()
->
SetTrackWidthIndex
(
GetBoard
()
->
GetTrackWidthIndex
()
-
1
);
if
(
GetCanvas
()
->
IsMouseCaptured
()
)
GetCanvas
()
->
CallMouseCapture
(
aDC
,
wxDefaultPosition
,
false
);
...
...
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