mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
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
This commit is contained in:
@@ -86,12 +86,6 @@ Conductor::Conductor(Terminal *p1, Terminal* p2) :
|
|||||||
has_to_save_profile(false),
|
has_to_save_profile(false),
|
||||||
must_highlight_(Conductor::None)
|
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
|
//set Zvalue at 11 to be upper than the DiagramImageItem and element
|
||||||
setZValue(11);
|
setZValue(11);
|
||||||
previous_z_value = zValue();
|
previous_z_value = zValue();
|
||||||
@@ -129,6 +123,12 @@ Conductor::Conductor(Terminal *p1, Terminal* p2) :
|
|||||||
// Add the text field
|
// Add the text field
|
||||||
m_text_item = new ConductorTextItem(m_properties.text, this);
|
m_text_item = new ConductorTextItem(m_properties.text, this);
|
||||||
connect(m_text_item, &ConductorTextItem::diagramTextChanged, this, &Conductor::displayedTextChanged);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user