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
36e62b10
Commit
36e62b10
authored
Mar 28, 2014
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eeschema: fix Bug #1298868 (Can't create new schematic from main toolbar icon)
parent
44e1f4fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
files-io.cpp
eeschema/files-io.cpp
+11
-7
schframe.cpp
eeschema/schframe.cpp
+3
-3
No files found.
eeschema/files-io.cpp
View file @
36e62b10
...
...
@@ -368,20 +368,24 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
// Delete old caches.
CMP_LIBRARY
::
RemoveCacheLibrary
();
libCacheExist
=
LoadCacheLibrary
(
g_RootSheet
->
GetScreen
()
->
GetFileName
()
);
if
(
!
wxFileExists
(
g_RootSheet
->
GetScreen
()
->
GetFileName
()
)
&&
!
libCacheExist
)
if
(
!
wxFileExists
(
g_RootSheet
->
GetScreen
()
->
GetFileName
()
)
)
{
Zoom_Automatique
(
false
);
msg
.
Printf
(
_
(
"File '%s' not found."
),
GetChars
(
g_RootSheet
->
GetScreen
()
->
GetFileName
()
)
);
DisplayInfoMessage
(
this
,
msg
);
// return false;
if
(
aCtl
==
0
)
{
msg
.
Printf
(
_
(
"File '%s' not found."
),
GetChars
(
g_RootSheet
->
GetScreen
()
->
GetFileName
()
)
);
DisplayInfoMessage
(
this
,
msg
);
return
false
;
}
return
true
;
// do not close Eeschema if the file if not found:
// we may have to create a new schematic file.
}
// load the project.
libCacheExist
=
LoadCacheLibrary
(
g_RootSheet
->
GetScreen
()
->
GetFileName
()
);
g_RootSheet
->
SetScreen
(
NULL
);
bool
diag
=
g_RootSheet
->
Load
(
this
);
SetScreen
(
m_CurrentSheet
->
LastScreen
()
);
...
...
eeschema/schframe.cpp
View file @
36e62b10
...
...
@@ -730,13 +730,13 @@ void SCH_EDIT_FRAME::OnLoadCmpToFootprintLinkFile( wxCommandEvent& event )
void
SCH_EDIT_FRAME
::
OnNewProject
(
wxCommandEvent
&
event
)
{
wxFileDialog
dlg
(
this
,
_
(
"
Open
Schematic"
),
wxGetCwd
(),
wxFileDialog
dlg
(
this
,
_
(
"
New
Schematic"
),
wxGetCwd
(),
wxEmptyString
,
SchematicFileWildcard
,
wxFD_
OPEN
|
wxFD_FILE_MUST_EXIST
);
wxFD_
SAVE
);
if
(
dlg
.
ShowModal
()
!=
wxID_CANCEL
)
{
OpenProjectFiles
(
std
::
vector
<
wxString
>
(
1
,
dlg
.
GetPath
()
)
);
OpenProjectFiles
(
std
::
vector
<
wxString
>
(
1
,
dlg
.
GetPath
()
)
,
1
);
}
}
...
...
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