Minor fix: conductor text don't move with element.

When move two elements connected by a conductor, the conductor text
don't follow the movement when he is previously moved by the user.
This commit is contained in:
Claveau Joshua
2020-03-22 20:19:41 +01:00
parent c0746b3fa4
commit aaccc33e7b
2 changed files with 14 additions and 13 deletions

View File

@@ -101,8 +101,10 @@ DiagramContent::DiagramContent(Diagram *diagram, bool selected) :
other_terminal = conductor->terminal1;
//If the two elements of conductor are movable
if (m_elements.contains(other_terminal -> parentElement()) && !m_conductors_to_move.contains(conductor))
m_conductors_to_move << conductor;
if (m_elements.contains(other_terminal -> parentElement())) {
if (!m_conductors_to_move.contains(conductor))
m_conductors_to_move << conductor;
}
else if (!m_conductors_to_update.contains(conductor))
m_conductors_to_update << conductor;
}