diff --git a/sources/elementspanelwidget.cpp b/sources/elementspanelwidget.cpp index 4eb533cf6..fb77cdf48 100644 --- a/sources/elementspanelwidget.cpp +++ b/sources/elementspanelwidget.cpp @@ -643,6 +643,12 @@ void ElementsPanelWidget::duplicateDiagram() for (QGraphicsItem *item : new_diagram->items()) { if (Element *elmt = dynamic_cast(item)) { + // The XML round-trip kept the source elements' uuids. Give the + // copies their own identity (as PasteDiagramCommand::redo() + // does for on-diagram paste): element.uuid is the PRIMARY KEY + // of the project database, so duplicates fail to insert and + // silently vanish from nomenclature/summary tables. + elmt->newUuid(); new_diagram->restoreText(elmt); } }