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
64e38bd7
Commit
64e38bd7
authored
Jul 28, 2014
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KICAD_MANAGER_FRAME::SetProjectFileName() uses PROJECT::SetProjectFullName()
and forces absolute path.
parent
281ce25d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
mainframe.cpp
kicad/mainframe.cpp
+9
-6
prjconfig.cpp
kicad/prjconfig.cpp
+5
-2
No files found.
kicad/mainframe.cpp
View file @
64e38bd7
...
@@ -127,16 +127,19 @@ wxConfigBase* KICAD_MANAGER_FRAME::config()
...
@@ -127,16 +127,19 @@ wxConfigBase* KICAD_MANAGER_FRAME::config()
void
KICAD_MANAGER_FRAME
::
SetProjectFileName
(
const
wxString
&
aFullProjectProFileName
)
void
KICAD_MANAGER_FRAME
::
SetProjectFileName
(
const
wxString
&
aFullProjectProFileName
)
{
{
m_project_file_name
=
aFullProjectProFileName
;
// ensure file name is absolute:
wxFileName
fn
(
aFullProjectProFileName
);
wxASSERT
(
wxFileName
(
m_project_file_name
).
IsAbsolute
()
||
if
(
!
fn
.
IsAbsolute
()
)
wxFileName
(
m_project_file_name
).
GetName
()
==
NAMELESS_PROJECT
wxT
(
".pro"
)
);
fn
.
MakeAbsolute
();
Prj
().
SetProjectFullName
(
fn
.
GetFullPath
()
);
}
}
const
wxString
KICAD_MANAGER_FRAME
::
GetProjectFileName
()
const
wxString
KICAD_MANAGER_FRAME
::
GetProjectFileName
()
{
{
return
m_project_file_name
;
return
Prj
().
GetProjectFullName
()
;
}
}
...
@@ -287,7 +290,7 @@ void KICAD_MANAGER_FRAME::RunEeschema( const wxString& aProjectSchematicFileName
...
@@ -287,7 +290,7 @@ void KICAD_MANAGER_FRAME::RunEeschema( const wxString& aProjectSchematicFileName
void
KICAD_MANAGER_FRAME
::
OnRunEeschema
(
wxCommandEvent
&
event
)
void
KICAD_MANAGER_FRAME
::
OnRunEeschema
(
wxCommandEvent
&
event
)
{
{
wxFileName
fn
(
m_project_file_name
);
wxFileName
fn
(
GetProjectFileName
()
);
fn
.
SetExt
(
SchematicFileExtension
);
fn
.
SetExt
(
SchematicFileExtension
);
...
@@ -339,7 +342,7 @@ void KICAD_MANAGER_FRAME::OnRunPageLayoutEditor( wxCommandEvent& event )
...
@@ -339,7 +342,7 @@ void KICAD_MANAGER_FRAME::OnRunPageLayoutEditor( wxCommandEvent& event )
void
KICAD_MANAGER_FRAME
::
OnRunCvpcb
(
wxCommandEvent
&
event
)
void
KICAD_MANAGER_FRAME
::
OnRunCvpcb
(
wxCommandEvent
&
event
)
{
{
wxFileName
fn
(
m_project_file_name
);
wxFileName
fn
(
GetProjectFileName
()
);
fn
.
SetExt
(
NetlistFileExtension
);
fn
.
SetExt
(
NetlistFileExtension
);
...
...
kicad/prjconfig.cpp
View file @
64e38bd7
...
@@ -182,8 +182,6 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event )
...
@@ -182,8 +182,6 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event )
{
{
wxString
title
;
wxString
title
;
// this is still a pr, will work on it tomorrow.
ClearMsg
();
ClearMsg
();
if
(
event
.
GetId
()
!=
wxID_ANY
)
if
(
event
.
GetId
()
!=
wxID_ANY
)
...
@@ -210,8 +208,13 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event )
...
@@ -210,8 +208,13 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event )
if
(
dlg
.
ShowModal
()
==
wxID_CANCEL
)
if
(
dlg
.
ShowModal
()
==
wxID_CANCEL
)
return
;
return
;
DBG
(
printf
(
"%s: wxFileDialog::GetPath=%s
\n
"
,
__func__
,
TO_UTF8
(
dlg
.
GetPath
()
)
);)
wxFileName
pro
(
dlg
.
GetPath
()
);
wxFileName
pro
(
dlg
.
GetPath
()
);
if
(
!
pro
.
IsAbsolute
()
)
pro
.
MakeAbsolute
();
pro
.
SetExt
(
ProjectFileExtension
);
pro
.
SetExt
(
ProjectFileExtension
);
if
(
newProject
)
if
(
newProject
)
...
...
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