comparison framework/Document.cpp @ 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 0948bf800422
children dd74c5332b49
comparison
equal deleted inserted replaced
82:1fa8d5e28d0f 83:c60bf8995166
451 } 451 }
452 452
453 model = ModelTransformerFactory::getInstance()->transform 453 model = ModelTransformerFactory::getInstance()->transform
454 (transform, input, message); 454 (transform, input, message);
455 455
456 // The transform we actually used was presumably identical to the
457 // one asked for, except that the version of the plugin may
458 // differ. It's possible that the returned message contains a
459 // warning about this; that doesn't concern us here, but we do
460 // need to ensure that the transform we remember is correct for
461 // what was actually applied, with the current plugin version.
462
463 Transform applied = transform;
464 applied.setPluginVersion
465 (TransformFactory::getInstance()->
466 getDefaultTransformFor(transform.getIdentifier(),
467 lrintf(transform.getSampleRate()))
468 .getPluginVersion());
469
456 if (!model) { 470 if (!model) {
457 std::cerr << "WARNING: Document::addDerivedModel: no output model for transform " << transform.getIdentifier().toStdString() << std::endl; 471 std::cerr << "WARNING: Document::addDerivedModel: no output model for transform " << transform.getIdentifier().toStdString() << std::endl;
458 } else { 472 } else {
459 addDerivedModel(transform, input, model); 473 addDerivedModel(applied, input, model);
460 } 474 }
461 475
462 return model; 476 return model;
463 } 477 }
464 478