mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-13 18:14:13 +02:00
Follow up Auto-break conductors
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
#include "elementsmover.h"
|
||||
#include "qetproject.h"
|
||||
#include "autobreakconductor.h"
|
||||
#include "conductorautonumerotation.h"
|
||||
#include "diagram.h"
|
||||
#include "qetgraphicsitem/conductor.h"
|
||||
@@ -178,6 +179,16 @@ void ElementsMover::endMovement()
|
||||
undo_object->setText(quc->text());
|
||||
}
|
||||
|
||||
//Auto-break conductors: for each moved element, break any conductor
|
||||
//whose path passes through a terminal dock point, and reconnect through
|
||||
//the element. The element is already at its final position on screen.
|
||||
if (m_diagram->project()->autoBreakConductor())
|
||||
{
|
||||
for (Element *e : m_moved_content.m_elements) {
|
||||
autoBreakConductors(m_diagram, e, undo_object);
|
||||
}
|
||||
}
|
||||
|
||||
//There is only one element moved, and project authorize auto conductor,
|
||||
//we try auto connection of conductor;
|
||||
typedef DiagramContent dc;
|
||||
|
||||
Reference in New Issue
Block a user