# HG changeset patch # User Chris Cannam # Date 1201542224 0 # Node ID c60bf8995166887c9bd5cb86070a345eddf53d61 # Parent 1fa8d5e28d0fec091187238bc6bd6e1a233e3e18 * Ensure plugin version is updated when a transform is re-run using a newer plugin -- so that the plugin version saved in the session corresponds with the one that was actually used, not the one previously specified * Fix uninitialised font size in preferences -- was causing all sorts of grief diff -r 1fa8d5e28d0f -r c60bf8995166 framework/Document.cpp --- a/framework/Document.cpp Fri Jan 25 18:15:57 2008 +0000 +++ b/framework/Document.cpp Mon Jan 28 17:43:44 2008 +0000 @@ -453,10 +453,24 @@ model = ModelTransformerFactory::getInstance()->transform (transform, input, message); + // The transform we actually used was presumably identical to the + // one asked for, except that the version of the plugin may + // differ. It's possible that the returned message contains a + // warning about this; that doesn't concern us here, but we do + // need to ensure that the transform we remember is correct for + // what was actually applied, with the current plugin version. + + Transform applied = transform; + applied.setPluginVersion + (TransformFactory::getInstance()-> + getDefaultTransformFor(transform.getIdentifier(), + lrintf(transform.getSampleRate())) + .getPluginVersion()); + if (!model) { std::cerr << "WARNING: Document::addDerivedModel: no output model for transform " << transform.getIdentifier().toStdString() << std::endl; } else { - addDerivedModel(transform, input, model); + addDerivedModel(applied, input, model); } return model; diff -r 1fa8d5e28d0f -r c60bf8995166 framework/Document.h --- a/framework/Document.h Fri Jan 25 18:15:57 2008 +0000 +++ b/framework/Document.h Mon Jan 28 17:43:44 2008 +0000 @@ -297,7 +297,7 @@ protected: Document *m_d; View *m_view; // I don't own this - Layer *m_layer; // Document owns this, but I determine its lifespans + Layer *m_layer; // Document owns this, but I determine its lifespan QString m_name; bool m_added; };