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;
...
@@ -51,16 +51,21 @@ using namespace DSN;
void
WinEDA_PcbFrame
::
ExportToSpecctra
(
wxCommandEvent
&
event
)
void
WinEDA_PcbFrame
::
ExportToSpecctra
(
wxCommandEvent
&
event
)
{
{
wxString
fullFileName
=
GetScreen
()
->
m_FileName
;
wxString
fullFileName
=
GetScreen
()
->
m_FileName
;
wxString
std_ext
=
wxT
(
".dsn"
);
wxString
path
;
wxString
mask
=
wxT
(
"*"
)
+
std_ext
;
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:"
),
fullFileName
=
EDA_FileSelector
(
_
(
"Specctra DSN file:"
),
wxEmptyString
,
/* Chemin par defaut */
path
,
fullFileName
,
/* nom fichier par defaut */
name
,
// name.ext without path!
std_ext
,
/* extension par defaut */
dsn_ext
,
mask
,
/* Masque d'affichage */
mask
,
this
,
this
,
wxFD_SAVE
,
wxFD_SAVE
,
FALSE
FALSE
...
...
pcbnew/specctra_import.cpp
View file @
951e759f
...
@@ -60,22 +60,27 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
...
@@ -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
sessionExt
(
wxT
(
".ses"
)
);
wxString
fileName
=
GetScreen
()
->
m_FileName
;
wxString
mask
=
wxT
(
"*"
)
+
sessionExt
;
wxString
mask
=
wxT
(
"*"
)
+
sessionExt
;
ChangeFileNameExt
(
fileName
,
sessionExt
);
wxFileName
::
SplitPath
(
fullFileName
,
&
path
,
&
name
,
&
ext
);
name
+=
sessionExt
;
fileName
=
EDA_FileSelector
(
_
(
"Merge Specctra Session file:"
),
f
ullF
ileName
=
EDA_FileSelector
(
_
(
"Merge Specctra Session file:"
),
wxEmptyString
,
path
,
fileName
,
name
,
// name.ext without path!
sessionExt
,
sessionExt
,
mask
,
mask
,
this
,
this
,
wxFD_OPEN
,
wxFD_OPEN
,
FALSE
);
FALSE
);
if
(
fileName
==
wxEmptyString
)
if
(
f
ullF
ileName
==
wxEmptyString
)
return
;
return
;
SPECCTRA_DB
db
;
SPECCTRA_DB
db
;
...
@@ -84,7 +89,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
...
@@ -84,7 +89,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
try
try
{
{
db
.
LoadSESSION
(
fileName
);
db
.
LoadSESSION
(
f
ullF
ileName
);
db
.
FromSESSION
(
m_Pcb
);
db
.
FromSESSION
(
m_Pcb
);
}
}
catch
(
IOError
ioe
)
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