Conductors num can be exported to csv file.

This commit is contained in:
joshua
2019-10-04 19:37:46 +02:00
parent 8cc34d5f6a
commit 5de220c485
5 changed files with 214 additions and 18 deletions

View File

@@ -88,23 +88,26 @@ DiagramContent::DiagramContent(Diagram *diagram, bool selected) :
//For each selected element, we determine if conductors must be moved or updated.
for(Element *elmt : m_elements)
{
for(Terminal *terminal : elmt->terminals())
{
for(Conductor *conductor : terminal->conductors())
{
Terminal *other_terminal;
if (conductor->terminal1 == terminal)
other_terminal = conductor->terminal2;
else
other_terminal = conductor->terminal1;
if (elmt->isSelected())
{
for(Terminal *terminal : elmt->terminals())
{
for(Conductor *conductor : terminal->conductors())
{
Terminal *other_terminal;
if (conductor->terminal1 == terminal)
other_terminal = conductor->terminal2;
else
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;
else if (!m_conductors_to_update.contains(conductor))
m_conductors_to_update << conductor;
}
}
//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;
else if (!m_conductors_to_update.contains(conductor))
m_conductors_to_update << conductor;
}
}
}
}
}