mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Conductors num can be exported to csv file.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user