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
03569ca1
Commit
03569ca1
authored
Apr 06, 2008
by
diemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PCBNew: Display a warning on a file format version mismatch. Minor language fix.
parent
7ce55e48
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
change_log.txt
change_log.txt
+2
-1
load_one_schematic_file.cpp
eeschema/load_one_schematic_file.cpp
+2
-2
files.cpp
pcbnew/files.cpp
+12
-0
No files found.
change_log.txt
View file @
03569ca1
...
...
@@ -8,7 +8,8 @@ email address.
2008-Mar-30 UPDATE Jonas Diemer <diemer-at-gmx.de>
================================================================================
+eeschema
EESchema displays a warning now on a file format mismatch.
+pcbnew
Display a warning on a file format version mismatch.
2008-Mar-31 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
...
...
eeschema/load_one_schematic_file.cpp
View file @
03569ca1
...
...
@@ -115,7 +115,7 @@ bool WinEDA_SchematicFrame::LoadOneEEFile( SCH_SCREEN* screen, const wxString& F
||
strncmp
(
Line
+
9
,
SCHEMATIC_HEAD_STRING
,
sizeof
(
SCHEMATIC_HEAD_STRING
)
-
1
)
!=
0
)
{
MsgDiag
=
FullFileName
+
_
(
" is NOT
EESchema file
"
);
MsgDiag
=
FullFileName
+
_
(
" is NOT
an EESchema file!
"
);
DisplayError
(
this
,
MsgDiag
);
fclose
(
f
);
return
FALSE
;
...
...
@@ -137,7 +137,7 @@ bool WinEDA_SchematicFrame::LoadOneEEFile( SCH_SCREEN* screen, const wxString& F
LineCount
++
;
if
(
fgets
(
Line
,
1024
-
1
,
f
)
==
NULL
||
strncmp
(
Line
,
"LIBS:"
,
5
)
!=
0
)
{
MsgDiag
=
FullFileName
+
_
(
" is NOT
EESchema file
"
);
MsgDiag
=
FullFileName
+
_
(
" is NOT
an EESchema file!
"
);
DisplayError
(
this
,
MsgDiag
);
fclose
(
f
);
return
FALSE
;
...
...
pcbnew/files.cpp
View file @
03569ca1
...
...
@@ -194,6 +194,18 @@ int WinEDA_PcbFrame::LoadOnePcbFile( const wxString& FullFileName, bool Append )
return
0
;
}
int
ver
;
sscanf
(
cbuf
,
"PCBNEW-BOARD Version %d date"
,
&
ver
);
printf
(
"version: %d -> %d - %s
\n
"
,
ver
,
g_CurrentVersionPCB
,
cbuf
);
if
(
ver
>
g_CurrentVersionPCB
)
{
DisplayInfo
(
this
,
_
(
"This file was created by a more recent version of PCBnew and may not load correctly. Please consider updating!"
));
}
else
if
(
ver
<
g_CurrentVersionPCB
)
{
DisplayInfo
(
this
,
_
(
"This file was created by an older version of EESchema. It will be stored in the new file format when you save this file again."
));
}
SetTitle
(
GetScreen
()
->
m_FileName
);
SetLastProject
(
GetScreen
()
->
m_FileName
);
...
...
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