finalize order properly

This commit is contained in:
David Rose 2005-04-23 00:09:04 +00:00
parent 9b560c9370
commit 360f0bbaa2
2 changed files with 12 additions and 0 deletions

View File

@ -1047,6 +1047,14 @@ make_from_bam(const FactoryParams &params) {
void qpGeom::
finalize(BamReader *manager) {
CDWriter cdata(_cycler);
// Make sure our GeomVertexData is finalized first. This may result
// in the data getting finalized multiple times, but it doesn't mind
// that.
if (cdata->_data != (qpGeomVertexData *)NULL) {
cdata->_data->finalize(manager);
}
reset_geom_rendering(cdata);
}

View File

@ -1533,6 +1533,10 @@ complete_pointers(TypedWritable **p_list, BamReader *manager) {
////////////////////////////////////////////////////////////////////
void qpGeomVertexData::
finalize(BamReader *manager) {
// NOTE: This method may be called more than once, because the
// Geom::finalize() will call it explicitly. We have to be prepared
// to accept multiple finalize() calls.
// Now we need to register the format that we have read from the bam
// file (since it doesn't come out of the bam file automatically
// registered). This may change the format's pointer, which we