export title with sheet name

This commit is contained in:
Ronan Le Tiec 2021-03-14 16:57:20 +01:00
parent 0e420963cf
commit 4ec454a9ef

View File

@ -784,7 +784,7 @@ void VPMainWindow::generateTiledPdf(QString fileName)
printer->setOutputFileName(fileName); printer->setOutputFileName(fileName);
printer->setResolution(static_cast<int>(PrintDPI)); printer->setResolution(static_cast<int>(PrintDPI));
printer->setDocName("Test"); // FIXME printer->setDocName(m_layout->GetFocusedSheet()->GetName());
// ------------- Set up the painter // ------------- Set up the painter
QPainter painter; QPainter painter;
@ -1367,7 +1367,7 @@ void VPMainWindow::on_pushButtonSheetExport_clicked()
generator.setFileName(fileName); generator.setFileName(fileName);
generator.setSize(QSize(qFloor(s.width()),qFloor(s.height()))); generator.setSize(QSize(qFloor(s.width()),qFloor(s.height())));
generator.setViewBox(r); generator.setViewBox(r);
generator.setTitle(tr("Pattern")); generator.setTitle(m_layout->GetFocusedSheet()->GetName());
generator.setDescription(m_layout->GetDescription().toHtmlEscaped()); generator.setDescription(m_layout->GetDescription().toHtmlEscaped());
generator.setResolution(static_cast<int>(PrintDPI)); generator.setResolution(static_cast<int>(PrintDPI));