mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 22:00:35 +01:00
Fix dxf export for copied conductors
This commit is contained in:
@@ -578,12 +578,14 @@ void ExportDialog::generateDxf(Diagram *diagram, int width, int height, bool kee
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Draw conductors
|
//Draw conductors
|
||||||
foreach(Conductor *cond, list_conductors) {
|
foreach(Conductor *cond, list_conductors) {
|
||||||
foreach(ConductorSegment *segment, cond -> segmentsList()) {
|
qreal cx = cond->pos().x();
|
||||||
qreal x1 = (segment -> firstPoint().x()) * Createdxf::xScale;
|
qreal cy = cond->pos().y();
|
||||||
qreal y1 = Createdxf::sheetHeight - (segment -> firstPoint().y() * Createdxf::yScale);
|
foreach(ConductorSegment *segment, cond -> segmentsList()) {
|
||||||
qreal x2 = (segment -> secondPoint().x()) * Createdxf::xScale;
|
qreal x1 = (cx + segment -> firstPoint().x()) * Createdxf::xScale;
|
||||||
qreal y2 = Createdxf::sheetHeight - (segment -> secondPoint().y() * Createdxf::yScale);
|
qreal y1 = Createdxf::sheetHeight - ((cy + segment -> firstPoint().y()) * Createdxf::yScale);
|
||||||
|
qreal x2 = (cx + segment -> secondPoint().x()) * Createdxf::xScale;
|
||||||
|
qreal y2 = Createdxf::sheetHeight - ((cy + segment -> secondPoint().y()) * Createdxf::yScale);
|
||||||
Createdxf::drawLine(file_path, x1, y1, x2, y2, 0);
|
Createdxf::drawLine(file_path, x1, y1, x2, y2, 0);
|
||||||
}
|
}
|
||||||
//Draw conductor text item
|
//Draw conductor text item
|
||||||
|
|||||||
Reference in New Issue
Block a user