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
f55a436d
Commit
f55a436d
authored
Nov 06, 2014
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
map class CPolyLine (used in zones) in Python.
parent
9f6d1d0e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
18 deletions
+22
-18
dialog_plot_schematic.cpp
eeschema/dialogs/dialog_plot_schematic.cpp
+9
-10
dialog_plot.cpp
pcbnew/dialogs/dialog_plot.cpp
+9
-8
kicad.i
scripting/kicad.i
+4
-0
No files found.
eeschema/dialogs/dialog_plot_schematic.cpp
View file @
f55a436d
...
...
@@ -176,21 +176,20 @@ void DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked( wxCommandEvent& even
wxFileName
dirName
=
wxFileName
::
DirName
(
dirDialog
.
GetPath
()
);
wxMessageDialog
dialog
(
this
,
_
(
"Use a relative path? "
),
_
(
"Plot Output Directory"
),
fn
=
Prj
().
AbsolutePath
(
g_RootSheet
->
GetFileName
()
);
wxString
defaultPath
=
fn
.
GetPathWithSep
();
wxString
msg
;
msg
.
Printf
(
_
(
"Do you want to use a path relative to
\n
'%s'"
),
GetChars
(
defaultPath
)
);
wxMessageDialog
dialog
(
this
,
msg
,
_
(
"Plot Output Directory"
),
wxYES_NO
|
wxICON_QUESTION
|
wxYES_DEFAULT
);
// relative directory selected
if
(
dialog
.
ShowModal
()
==
wxID_YES
)
{
wxString
plotFilePath
=
g_RootSheet
->
GetFileName
();
plotFilePath
=
Prj
().
AbsolutePath
(
plotFilePath
);
plotFilePath
=
wxPathOnly
(
plotFilePath
);
if
(
!
dirName
.
MakeRelativeTo
(
plotFilePath
)
)
wxMessageBox
(
_
(
"Cannot make path relative (target volume different from board file volume)!"
),
if
(
!
dirName
.
MakeRelativeTo
(
defaultPath
)
)
wxMessageBox
(
_
(
"Cannot make path relative (target volume different from file volume)!"
),
_
(
"Plot Output Directory"
),
wxOK
|
wxICON_ERROR
);
}
...
...
pcbnew/dialogs/dialog_plot.cpp
View file @
f55a436d
...
...
@@ -315,18 +315,19 @@ void DIALOG_PLOT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event )
wxFileName
dirName
=
wxFileName
::
DirName
(
dirDialog
.
GetPath
()
);
wxMessageDialog
dialog
(
this
,
_
(
"Use a relative path? "
),
_
(
"Plot Output Directory"
),
fn
=
Prj
().
AbsolutePath
(
m_parent
->
GetBoard
()
->
GetFileName
()
);
wxString
defaultPath
=
fn
.
GetPathWithSep
();
wxString
msg
;
msg
.
Printf
(
_
(
"Do you want to use a path relative to
\n
'%s'"
),
GetChars
(
defaultPath
)
);
wxMessageDialog
dialog
(
this
,
msg
,
_
(
"Plot Output Directory"
),
wxYES_NO
|
wxICON_QUESTION
|
wxYES_DEFAULT
);
if
(
dialog
.
ShowModal
()
==
wxID_YES
)
{
wxString
boardFilePath
=
Prj
().
AbsolutePath
(
m_parent
->
GetBoard
()
->
GetFileName
()
);
boardFilePath
=
wxPathOnly
(
boardFilePath
);
if
(
!
dirName
.
MakeRelativeTo
(
boardFilePath
)
)
wxMessageBox
(
_
(
"Cannot make path relative (target volume different from board file volume)!"
),
if
(
!
dirName
.
MakeRelativeTo
(
defaultPath
)
)
wxMessageBox
(
_
(
"Cannot make path relative (target volume different from file volume)!"
),
_
(
"Plot Output Directory"
),
wxOK
|
wxICON_ERROR
);
}
...
...
scripting/kicad.i
View file @
f55a436d
...
...
@@ -115,6 +115,10 @@
/* KiCad plugin handling */
%include "kicadplugins.i"
// map CPolyLine and classes used in CPolyLine:
#include <../polygon/PolyLine.h>
%include <../polygon/PolyLine.h>
// ignore warning relative to operator = and operator ++:
#pragma SWIG nowarn=362,383
...
...
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