Merge pull request #628 from ispyisail/feature-wiring-db-tables

Add terminal and conductor tables to projectDataBase (discussion #503, slice 2)
This commit is contained in:
Laurent Trinques
2026-08-21 14:03:02 +02:00
committed by GitHub
9 changed files with 360 additions and 1 deletions
+8
View File
@@ -17,6 +17,7 @@
*/
#include "elementspanelwidget.h"
#include "diagram.h"
#include "qetgraphicsitem/conductor.h"
#include "editor/ui/qetelementeditor.h"
#include "elementscategoryeditor.h"
#include "qetapp.h"
@@ -684,6 +685,13 @@ void ElementsPanelWidget::duplicateDiagram()
elmt->newUuid();
new_diagram->restoreText(elmt);
}
else if (Conductor *cond = dynamic_cast<Conductor *>(item)) {
// Same reasoning for conductors: conductor.uuid is the PRIMARY
// KEY of the conductor table, and its insert is a plain INSERT,
// so a duplicated uuid fails and the wire silently disappears
// from the wiring list and the per-element wire count.
cond->newUuid();
}
}
}