title block properties widget: minor improvement

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3210 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-07-13 13:37:43 +00:00
parent 1bb7d0bc02
commit 83583dd94e
4 changed files with 69 additions and 27 deletions

View File

@@ -647,16 +647,14 @@ void DiagramView::editDiagramProperties() {
BorderPropertiesWidget *border_infos = new BorderPropertiesWidget(border, &popup);
border_infos -> setReadOnly(diagram_is_read_only);
TitleBlockPropertiesWidget *titleblock_infos = new TitleBlockPropertiesWidget(titleblock, false, &popup);
TitleBlockPropertiesWidget *titleblock_infos;
if (QETProject *parent_project = scene -> project()) {
titleblock_infos -> setTitleBlockTemplatesCollection(parent_project -> embeddedTitleBlockTemplatesCollection());
titleblock_infos -> setTitleBlockTemplatesVisible(true);
// we have to parse again the TitleBlockProperties object, since the
// first parsing did not know of our templates
titleblock_infos -> setProperties(titleblock);
// relay the signal that requires a title block template edition
titleblock_infos = new TitleBlockPropertiesWidget(parent_project -> embeddedTitleBlockTemplatesCollection(), titleblock, false, &popup);
connect(titleblock_infos, SIGNAL(editTitleBlockTemplate(QString, bool)), this, SIGNAL(editTitleBlockTemplate(QString, bool)));
}
else
titleblock_infos = new TitleBlockPropertiesWidget(titleblock, false, &popup);
titleblock_infos -> setReadOnly(diagram_is_read_only);
ConductorPropertiesWidget *cpw = new ConductorPropertiesWidget(conductors);