Mercurial > hg > svapp
changeset 83:c60bf8995166
* 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
author | Chris Cannam |
---|---|
date | Mon, 28 Jan 2008 17:43:44 +0000 |
parents | 1fa8d5e28d0f |
children | 19142c58cc4c |
files | framework/Document.cpp framework/Document.h |
diffstat | 2 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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; };