Mercurial > hg > svapp
changeset 50:a8bb5b2aca4c
* Fix availability of alignment button and relative align/solo button state
author | Chris Cannam |
---|---|
date | Thu, 01 Nov 2007 16:02:01 +0000 |
parents | 73f682a551dc |
children | e41af8419d4a |
files | framework/Document.cpp framework/Document.h |
diffstat | 2 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/framework/Document.cpp Thu Nov 01 10:45:28 2007 +0000 +++ b/framework/Document.cpp Thu Nov 01 16:02:01 2007 +0000 @@ -670,6 +670,14 @@ return models; } +bool +Document::canAlign() const +{ + TransformId id = "vamp:match-vamp-plugin:match:path"; + TransformFactory *factory = TransformFactory::getInstance(); + return factory->haveTransform(id); +} + void Document::alignModel(Model *model) {
--- a/framework/Document.h Thu Nov 01 10:45:28 2007 +0000 +++ b/framework/Document.h Thu Nov 01 16:02:01 2007 +0000 @@ -190,6 +190,12 @@ void removeLayerFromView(View *, Layer *); /** + * Return true if alignment is supported (i.e. if the necessary + * plugin is found). + */ + bool canAlign() const; + + /** * Specify whether models added via addImportedModel should be * automatically aligned against the main model if appropriate. */