mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-22 16:44:14 +02:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user