[qet] qet/qet: [5230] DXF export : fix some double items in dxf file, thanks to Gabberworld for this patch |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 5230
Author: scorpio810
Date: 2018-02-06 17:12:33 +0100 (Tue, 06 Feb 2018)
Log Message:
-----------
DXF export : fix some double items in dxf file, thanks to Gabberworld for this patch
Modified Paths:
--------------
trunk/sources/exportdialog.cpp
Modified: trunk/sources/exportdialog.cpp
===================================================================
--- trunk/sources/exportdialog.cpp 2018-02-05 04:53:54 UTC (rev 5229)
+++ trunk/sources/exportdialog.cpp 2018-02-06 16:12:33 UTC (rev 5230)
@@ -398,6 +398,7 @@
@param io_device Peripherique de sortie pour le code DXF (souvent : un fichier)
*/
void ExportDialog::generateDxf(Diagram *diagram, int width, int height, bool keep_aspect_ratio, QString &file_path) {
+ saveReloadDiagramParameters(diagram, true);
project_ -> setFilePath(file_path);
@@ -410,8 +411,10 @@
Createdxf::dxfBegin(file_path);
//Add project elements (lines, rectangles, circles, texts) to dxf file
- Createdxf::drawRectangle(file_path, 0, 0, double(width)*Createdxf::xScale, double(height)*Createdxf::yScale, 0);
- diagram -> border_and_titleblock.drawDxf(width, height, keep_aspect_ratio, file_path, 0);
+ if (epw -> exportProperties().draw_border) {
+ Createdxf::drawRectangle(file_path, 0, 0, double(width)*Createdxf::xScale, double(height)*Createdxf::yScale, 0);
+ }
+ diagram -> border_and_titleblock.drawDxf(width, height, keep_aspect_ratio, file_path, 0);
// Build the lists of elements.
QList<Element *> list_elements;
@@ -677,6 +680,8 @@
}
}
Createdxf::dxfEnd(file_path);
+
+ saveReloadDiagramParameters(diagram, false);
}
void ExportDialog::fillRow(QString file_path, const QRectF &row_rect, QString author, QString title,