diff --git a/sources/configpages.cpp b/sources/configpages.cpp index 85e2fa164..e08b599e6 100644 --- a/sources/configpages.cpp +++ b/sources/configpages.cpp @@ -46,6 +46,7 @@ NewDiagramPage::NewDiagramPage(QETProject *project, QWidget *parent) : // default titleblock properties QList c; c << QETApp::commonTitleBlockTemplatesCollection() << QETApp::customTitleBlockTemplatesCollection(); + if (m_project) c << m_project->embeddedTitleBlockTemplatesCollection(); ipw = new TitleBlockPropertiesWidget(c, TitleBlockProperties::defaultProperties(), true); // default conductor properties cpw = new ConductorPropertiesWidget(ConductorProperties::defaultProperties()); diff --git a/sources/qetproject.cpp b/sources/qetproject.cpp index a98974d1d..c4184939e 100644 --- a/sources/qetproject.cpp +++ b/sources/qetproject.cpp @@ -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 m(new IntegrationMoveTitleBlockTemplatesHandler); integrateTitleBlockTemplate(collection -> location(titleblock.template_name), m.data()); }