The "clean project" dialog is now able to clean unused title block template.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1478 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2012-01-24 07:11:19 +00:00
parent 7f9d792368
commit cae43d0fc1
5 changed files with 34 additions and 5 deletions

View File

@@ -287,6 +287,19 @@ void TitleBlockTemplatesProjectCollection::fromXml(const QDomElement &xml_elemen
}
}
/**
Delete all title block templates not used within the parent project
*/
void TitleBlockTemplatesProjectCollection::deleteUnusedTitleBlocKTemplates() {
if (!project_) return;
foreach (QString template_name, templates()) {
if (!project_ -> usesTitleBlockTemplate(location(template_name))) {
removeTemplate(template_name);
}
}
}
/**
Constructor
@param path Path of the directory containing the collection