Check if file has correct suffix.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-04-19 14:04:15 +03:00
parent 44b01e8f1b
commit fca862a351

View File

@ -398,6 +398,11 @@ void TableWindow::PrintToPdf()
tr("PDF file (*.pdf)"));
if (not fileName.isEmpty())
{
if(QFileInfo(fileName).suffix().isEmpty())
{
fileName.append(".pdf");
}
printer.setOutputFileName(fileName);
printer.setResolution(static_cast<int>(VApplication::PrintDPI));
Print( &printer );