Fix layout export dialog.
This commit is contained in:
parent
91a6da3c26
commit
8462a7ec1d
|
@ -4049,13 +4049,21 @@ void VPMainWindow::on_ExportLayout()
|
|||
return;
|
||||
}
|
||||
|
||||
DialogSaveManualLayout dialog(sheets.size(), false, m_layout->LayoutSettings().GetTitle(), this);
|
||||
const QString layoutTitle = m_layout->LayoutSettings().GetTitle();
|
||||
const QString fileName = layoutTitle.isEmpty() ? QFileInfo(curFile).baseName() : layoutTitle;
|
||||
|
||||
DialogSaveManualLayout dialog(sheets.size(), false, fileName, this);
|
||||
|
||||
if (dialog.exec() == QDialog::Rejected)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (dialog.FileName().isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
VPExportData data;
|
||||
data.format = dialog.Format();
|
||||
data.path = dialog.Path();
|
||||
|
@ -4149,13 +4157,21 @@ void VPMainWindow::on_ExportSheet()
|
|||
}
|
||||
}
|
||||
|
||||
DialogSaveManualLayout dialog(1, false, sheet->GetName(), this);
|
||||
const QString sheetTitle = sheet->GetName();
|
||||
const QString fileName = sheetTitle.isEmpty() ? QFileInfo(curFile).baseName() : sheetTitle;
|
||||
|
||||
DialogSaveManualLayout dialog(1, false, fileName, this);
|
||||
|
||||
if (dialog.exec() == QDialog::Rejected)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (dialog.FileName().isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
VPExportData data;
|
||||
data.format = dialog.Format();
|
||||
data.path = dialog.Path();
|
||||
|
|
Loading…
Reference in New Issue
Block a user