mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Add title block embedded in a project (but not in common or custom collection) available
as a default title block for a new diagram in this project. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3919 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -456,8 +456,21 @@ void QETProject::setDefaultTitleBlockProperties(const TitleBlockProperties &titl
|
||||
if (!titleblock.template_name.isEmpty())
|
||||
{
|
||||
TitleBlockTemplatesFilesCollection *collection = nullptr;
|
||||
collection = titleblock.collection == QET::QetCollection::Common ? QETApp::commonTitleBlockTemplatesCollection() :
|
||||
QETApp::customTitleBlockTemplatesCollection();
|
||||
switch (titleblock.collection)
|
||||
{
|
||||
case QET::Common :
|
||||
collection = QETApp::commonTitleBlockTemplatesCollection();
|
||||
break;
|
||||
case QET::Custom :
|
||||
collection = QETApp::customTitleBlockTemplatesCollection();
|
||||
break;
|
||||
case QET::Embendded :
|
||||
//Titleblock is already embedded to project
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
QScopedPointer<IntegrationMoveTitleBlockTemplatesHandler> m(new IntegrationMoveTitleBlockTemplatesHandler);
|
||||
integrateTitleBlockTemplate(collection -> location(titleblock.template_name), m.data());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user