Follow up Auto-break conductors

This commit is contained in:
Kellermorph
2026-08-08 22:10:47 +02:00
parent 3eafe840f1
commit 39b1e836bf
7 changed files with 333 additions and 213 deletions
+11
View File
@@ -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;