mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-12 23:44:25 +02:00
Reapply "Add cable management: drawing, cores, numbering, cross-references and cable list"
This reverts commit 2bb3343d2d.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "deleteqgraphicsitemcommand.h"
|
||||
#include "../wiringrules.h"
|
||||
|
||||
#include "../cable/cablemanager.h"
|
||||
#include "../diagram.h"
|
||||
#include "../qetproject.h"
|
||||
#include "addgraphicsobjectcommand.h"
|
||||
@@ -337,6 +338,15 @@ void DeleteQGraphicsItemCommand::undo()
|
||||
}
|
||||
}
|
||||
|
||||
//Back on the sheet and linked again: the cables which run over
|
||||
//this report claim their wire on the other side once more.
|
||||
for (Element *e : m_removed_contents.m_elements) {
|
||||
if (e && (e->linkType() & Element::AllReport)) {
|
||||
CableManager::refreshLabels(m_diagram->project());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
QUndoCommand::undo();
|
||||
}
|
||||
|
||||
@@ -390,5 +400,16 @@ void DeleteQGraphicsItemCommand::redo()
|
||||
for(QGraphicsItem *item : m_removed_contents.items())
|
||||
m_diagram->removeItem(item);
|
||||
|
||||
//A folio report carries a cable core over to the next sheet:
|
||||
//taking one away (putting it back is undo, below) changes which
|
||||
//wires belong to which cable, so the cable fields are worked
|
||||
//out again straight away.
|
||||
for (Element *e : m_removed_contents.m_elements) {
|
||||
if (e && (e->linkType() & Element::AllReport)) {
|
||||
CableManager::refreshLabels(m_diagram->project());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
QUndoCommand::redo();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user