|
From: <gi...@gp...> - 2011-03-22 22:50:55
|
The branch, master has been updated
via f7ee676f22527b535f51d1506c56a36a8f2416ab (commit)
from e2aee1a681638b45d90efbae458dd8568e0f1ae2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/file.c | 11 ++++++++++-
src/global.h | 2 ++
2 files changed, 12 insertions(+), 1 deletions(-)
=================
Commit Messages
=================
commit f7ee676f22527b535f51d1506c56a36a8f2416ab
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Save footprints as footprints.
If the user loads a footprint as a PCB (i.e. File->Load) and tries
to save it, save only the elements in the pcb, not the whole pcb.
:100644 100644 e87aeea... 6363bf4... M src/file.c
:100644 100644 0420a18... e449a34... M src/global.h
=========
Changes
=========
commit f7ee676f22527b535f51d1506c56a36a8f2416ab
Author: DJ Delorie <dj...@de...>
Commit: DJ Delorie <dj...@de...>
Save footprints as footprints.
If the user loads a footprint as a PCB (i.e. File->Load) and tries
to save it, save only the elements in the pcb, not the whole pcb.
diff --git a/src/file.c b/src/file.c
index e87aeea..6363bf4 100644
--- a/src/file.c
+++ b/src/file.c
@@ -462,6 +462,7 @@ PostLoadElementPCB ()
PCB = pcb_save;
yyPCB->MaxWidth = e->BoundingBox.X2;
yyPCB->MaxHeight = e->BoundingBox.Y2;
+ yyPCB->is_footprint = 1;
}
/* ---------------------------------------------------------------------------
@@ -942,7 +943,15 @@ WritePipe (char *Filename, bool thePcb)
}
}
if (thePcb)
- result = WritePCB (fp);
+ {
+ if (PCB->is_footprint)
+ {
+ WriteElementData (fp, PCB->Data);
+ result = 0;
+ }
+ else
+ result = WritePCB (fp);
+ }
else
result = WriteBuffer (fp);
diff --git a/src/global.h b/src/global.h
index 0420a18..e449a34 100644
--- a/src/global.h
+++ b/src/global.h
@@ -510,6 +510,8 @@ typedef struct PCBType
LibraryType NetlistLib;
AttributeListType Attributes;
DataTypePtr Data; /* entire database */
+
+ bool is_footprint; /* If set, the user has loaded a footprint, not a pcb. */
}
PCBType, *PCBTypePtr;
|