Fix export to dxf.
--HG-- branch : develop
This commit is contained in:
parent
33cdac0db1
commit
424f661112
|
@ -795,10 +795,12 @@ void MainWindowsNoGUI::DxfFile(const QString &name, int i) const
|
|||
}
|
||||
|
||||
QPainter painter;
|
||||
painter.begin(&generator);
|
||||
if (painter.begin(&generator))
|
||||
{
|
||||
scenes.at(i)->render(&painter, paper->rect(), paper->rect(), Qt::IgnoreAspectRatio);
|
||||
painter.end();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
|
|
|
@ -2549,8 +2549,9 @@ void DL_Dxf::endSequence(DL_CreationInterface* creationInterface)
|
|||
*/
|
||||
DL_WriterA* DL_Dxf::out(const char* file, DL_Codes::version version)
|
||||
{
|
||||
char* f = new char[strlen(file)+1];
|
||||
strlcpy(f, file, sizeof(f));
|
||||
const int size = strlen(file)+1;
|
||||
char* f = new char[size];
|
||||
strlcpy(f, file, size); // Strange thing the sizeof(f) doesn't return correct value
|
||||
this->version = version;
|
||||
|
||||
DL_WriterA* dw = new DL_WriterA(f, version);
|
||||
|
|
Loading…
Reference in New Issue
Block a user