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
951e759f
Commit
951e759f
authored
Feb 20, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dodge some debug asserts in wxFileDialog which happen if the filename has a path
parent
a248ead3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
14 deletions
+24
-14
specctra_export.cpp
pcbnew/specctra_export.cpp
+12
-7
specctra_import.cpp
pcbnew/specctra_import.cpp
+12
-7
No files found.
pcbnew/specctra_export.cpp
View file @
951e759f
...
...
@@ -51,16 +51,21 @@ using namespace DSN;
void
WinEDA_PcbFrame
::
ExportToSpecctra
(
wxCommandEvent
&
event
)
{
wxString
fullFileName
=
GetScreen
()
->
m_FileName
;
wxString
std_ext
=
wxT
(
".dsn"
);
wxString
mask
=
wxT
(
"*"
)
+
std_ext
;
wxString
path
;
wxString
name
;
wxString
ext
;
ChangeFileNameExt
(
fullFileName
,
std_ext
);
wxString
dsn_ext
=
wxT
(
".dsn"
);
wxString
mask
=
wxT
(
"*"
)
+
dsn_ext
;
wxFileName
::
SplitPath
(
fullFileName
,
&
path
,
&
name
,
&
ext
);
name
+=
dsn_ext
;
fullFileName
=
EDA_FileSelector
(
_
(
"Specctra DSN file:"
),
wxEmptyString
,
/* Chemin par defaut */
fullFileName
,
/* nom fichier par defaut */
std_ext
,
/* extension par defaut */
mask
,
/* Masque d'affichage */
path
,
name
,
// name.ext without path!
dsn_ext
,
mask
,
this
,
wxFD_SAVE
,
FALSE
...
...
pcbnew/specctra_import.cpp
View file @
951e759f
...
...
@@ -60,22 +60,27 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
}
*/
wxString
fullFileName
=
GetScreen
()
->
m_FileName
;
wxString
path
;
wxString
name
;
wxString
ext
;
wxString
sessionExt
(
wxT
(
".ses"
)
);
wxString
fileName
=
GetScreen
()
->
m_FileName
;
wxString
mask
=
wxT
(
"*"
)
+
sessionExt
;
ChangeFileNameExt
(
fileName
,
sessionExt
);
wxFileName
::
SplitPath
(
fullFileName
,
&
path
,
&
name
,
&
ext
);
name
+=
sessionExt
;
fileName
=
EDA_FileSelector
(
_
(
"Merge Specctra Session file:"
),
wxEmptyString
,
fileName
,
f
ullF
ileName
=
EDA_FileSelector
(
_
(
"Merge Specctra Session file:"
),
path
,
name
,
// name.ext without path!
sessionExt
,
mask
,
this
,
wxFD_OPEN
,
FALSE
);
if
(
fileName
==
wxEmptyString
)
if
(
f
ullF
ileName
==
wxEmptyString
)
return
;
SPECCTRA_DB
db
;
...
...
@@ -84,7 +89,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
try
{
db
.
LoadSESSION
(
fileName
);
db
.
LoadSESSION
(
f
ullF
ileName
);
db
.
FromSESSION
(
m_Pcb
);
}
catch
(
IOError
ioe
)
...
...
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