libgeda: Make o_complex_copy() actually copy. [
2460301]
In the past, o_complex_copy() has instantiated a new COMPLEX by
calling o_complex_new(), which reads in symbol data from the symbol
library. A separate o_complex_copy_embedded() function performed a
copy for embedded objects, by actually performing a deep copy of the
COMPLEX to be copied.
Also note that components being placed from the component selector are
copied into place.
This lead to a bug reported by Peter Clifton, whereby the contents of
an embedded symbol could vary.
- If placed normally and then embedded, the attributes promoted out of
the COMPLEX prior to preparing to place were "resurrected" by the
magical file-reading powers of o_complex_copy(), and these
attributes were then kept when the symbol was embedded.
- If placed as embedded, the attributes were *not* resurrected,
meaning that the promotable attributes were *not* present in the
embedded symbol.
This patch modifies o_complex_copy() to explicitly carry out a deep
copy of the object to be copied, removing the file-reading behaviour
(this seems to be the Right Thing in this context). It also removes
o_complex_copy_embedded(), since it is then superfluous.