[qet] qet/qet: [4836] Minor fix : in some condition when open a project, the conductors properties aren't well apply |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4836
Author: blacksun
Date: 2017-01-08 12:01:03 +0100 (Sun, 08 Jan 2017)
Log Message:
-----------
Minor fix : in some condition when open a project, the conductors properties aren't well apply
Modified Paths:
--------------
trunk/sources/qetgraphicsitem/conductor.cpp
Modified: trunk/sources/qetgraphicsitem/conductor.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/conductor.cpp 2017-01-07 15:07:39 UTC (rev 4835)
+++ trunk/sources/qetgraphicsitem/conductor.cpp 2017-01-08 11:01:03 UTC (rev 4836)
@@ -86,12 +86,6 @@
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 @@
// 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);
}
/**