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
84572d37
Commit
84572d37
authored
Jul 08, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pcbnew: fix bug I recently created: footprint lib incorrectly saved (first module can be lost)
parent
87e220e1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
19 deletions
+29
-19
bitmap2component.cpp
bitmap2component/bitmap2component.cpp
+1
-0
build_version.cpp
common/build_version.cpp
+1
-1
install.nsi
packaging/windows/nsis/install.nsi
+1
-1
librairi.cpp
pcbnew/librairi.cpp
+24
-15
version.txt
version.txt
+2
-2
No files found.
bitmap2component/bitmap2component.cpp
View file @
84572d37
...
...
@@ -283,6 +283,7 @@ static void OuputHeader( BITMAPCONV_INFO& aInfo )
aInfo
.
m_PixmapWidth
,
aInfo
.
m_PixmapHeight
);
fprintf
(
aInfo
.
m_Outfile
,
"$MODULE %s
\n
"
,
CmpName
);
fprintf
(
aInfo
.
m_Outfile
,
"Po 0 0 0 15 00000000 00000000 ~~
\n
"
);
fprintf
(
aInfo
.
m_Outfile
,
"Li %s
\n
"
,
CmpName
);
fprintf
(
aInfo
.
m_Outfile
,
"T0 0 %d %d %d 0 %d N I %d
\"
G***
\"\n
"
,
Ypos
,
fieldSize
,
fieldSize
,
fieldSize
/
5
,
FIELD_LAYER
);
fprintf
(
aInfo
.
m_Outfile
,
"T1 0 %d %d %d 0 %d N I %d
\"
%s
\"\n
"
,
...
...
common/build_version.cpp
View file @
84572d37
...
...
@@ -6,7 +6,7 @@
#endif
#ifndef KICAD_BUILD_VERSION
#define KICAD_BUILD_VERSION "(2011-07-0
7
)"
#define KICAD_BUILD_VERSION "(2011-07-0
8
)"
#endif
...
...
packaging/windows/nsis/install.nsi
View file @
84572d37
...
...
@@ -17,7 +17,7 @@
; General Product Description Definitions
!define PRODUCT_NAME "KiCad"
!define PRODUCT_VERSION "2011.07.0
7
"
!define PRODUCT_VERSION "2011.07.0
8
"
!define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/"
!define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/"
!define COMPANY_NAME ""
...
...
pcbnew/librairi.cpp
View file @
84572d37
...
...
@@ -364,7 +364,6 @@ void WinEDA_ModuleEditFrame::Delete_Module_In_Library( const wxString& aLibname
void
PCB_BASE_FRAME
::
Archive_Modules
(
const
wxString
&
LibName
,
bool
NewModulesOnly
)
{
int
ii
,
NbModules
=
0
;
float
Pas
;
MODULE
*
Module
;
wxString
fileName
=
LibName
,
path
;
...
...
@@ -424,7 +423,7 @@ void PCB_BASE_FRAME::Archive_Modules( const wxString& LibName, bool NewModulesOn
for
(
;
Module
!=
NULL
;
Module
=
(
MODULE
*
)
Module
->
Next
()
)
NbModules
++
;
Pas
=
(
float
)
10
0
/
NbModules
;
double
step
=
100.
0
/
NbModules
;
DisplayActivity
(
0
,
wxEmptyString
);
Module
=
(
MODULE
*
)
GetBoard
()
->
m_Modules
;
...
...
@@ -434,7 +433,7 @@ void PCB_BASE_FRAME::Archive_Modules( const wxString& LibName, bool NewModulesOn
NewModulesOnly
?
false
:
true
,
false
)
==
0
)
break
;
DisplayActivity
(
(
int
)
(
ii
*
Pas
),
wxEmptyString
);
DisplayActivity
(
(
int
)
(
ii
*
step
),
wxEmptyString
);
/* Check for request to stop backup (ESCAPE key actuated) */
if
(
DrawPanel
->
m_AbortRequest
)
break
;
...
...
@@ -485,12 +484,19 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
{
wxTextEntryDialog
dlg
(
this
,
_
(
"Name:"
),
_
(
"Save module"
),
Name_Cmp
);
if
(
dlg
.
ShowModal
()
!=
wxID_OK
)
return
0
;
// cancelled by user
return
false
;
// cancelled by user
Name_Cmp
=
dlg
.
GetValue
();
Name_Cmp
.
Trim
(
true
);
Name_Cmp
.
Trim
(
false
);
if
(
Name_Cmp
.
IsEmpty
()
)
return
0
;
return
false
;
aModule
->
m_LibRef
=
Name_Cmp
;
}
// Ensure this footprint has a libname
if
(
Name_Cmp
.
IsEmpty
()
)
{
Name_Cmp
=
wxT
(
"noname"
);
aModule
->
m_LibRef
=
Name_Cmp
;
}
...
...
@@ -528,7 +534,7 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
if
(
!
aOverwrite
)
// Do not save the given footprint: an old one exists
{
fclose
(
lib_module
);
return
1
;
return
true
;
}
}
...
...
@@ -565,20 +571,23 @@ bool PCB_BASE_FRAME::Save_Module_In_Library( const wxString& aLibName,
LineNum
=
0
;
rewind
(
lib_module
);
GetLine
(
lib_module
,
Line
,
&
LineNum
);
while
(
GetLine
(
lib_module
,
Line
,
&
LineNum
)
)
{
StrPurge
(
Line
);
if
(
strnicmp
(
Line
,
"$MODULE"
,
7
)
==
0
)
break
;
}
/* Copy footprints, until the old footprint to delete */
// Copy footprints, until the old footprint to delete
bool
skip_header
=
true
;
while
(
GetLine
(
lib_module
,
Line
,
&
LineNum
)
)
{
StrPurge
(
Line
);
if
(
strnicmp
(
Line
,
"$EndLIBRARY"
,
8
)
==
0
)
continue
;
// Search fo the beginning of module section:
if
(
skip_header
)
{
if
(
strnicmp
(
Line
,
"$MODULE"
,
7
)
==
0
)
skip_header
=
false
;
else
continue
;
}
if
(
strnicmp
(
Line
,
"$MODULE"
,
7
)
==
0
)
{
sscanf
(
Line
+
7
,
" %s"
,
Name
);
...
...
version.txt
View file @
84572d37
release version:
2011 jul 0
7
2011 jul 0
8
files (.zip,.tgz):
kicad-2011-07-0
7
kicad-2011-07-0
8
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