From a6ace7705208a12b7524b3b5edb5c1f0bfba4dee Mon Sep 17 00:00:00 2001 From: blacksun Date: Sun, 8 Jan 2017 11:01:03 +0000 Subject: [PATCH] Minor fix : in some condition when open a project, the conductors properties aren't well apply git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4836 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/qetgraphicsitem/conductor.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sources/qetgraphicsitem/conductor.cpp b/sources/qetgraphicsitem/conductor.cpp index f8fb75c45..97df459f6 100644 --- a/sources/qetgraphicsitem/conductor.cpp +++ b/sources/qetgraphicsitem/conductor.cpp @@ -86,12 +86,6 @@ Conductor::Conductor(Terminal *p1, Terminal* p2) : has_to_save_profile(false), must_highlight_(Conductor::None) { - //Set the default conductor properties. - if (p1->diagram()) - m_properties = p1->diagram()->defaultConductorProperties; - else if (p2->diagram()) - m_properties = p2->diagram()->defaultConductorProperties; - //set Zvalue at 11 to be upper than the DiagramImageItem and element setZValue(11); previous_z_value = zValue(); @@ -129,6 +123,12 @@ Conductor::Conductor(Terminal *p1, Terminal* p2) : // Add the text field m_text_item = new ConductorTextItem(m_properties.text, this); connect(m_text_item, &ConductorTextItem::diagramTextChanged, this, &Conductor::displayedTextChanged); + + //Set the default conductor properties. + if (p1->diagram()) + setProperties(p1->diagram()->defaultConductorProperties); + else if (p2->diagram()) + setProperties(p2->diagram()->defaultConductorProperties); } /**