Use different dialog title for different export formats. Closes #2311

This commit is contained in:
baldurk
2021-07-08 10:35:54 +01:00
parent 2061ede738
commit 96533c71f4
+9 -2
View File
@@ -4022,13 +4022,20 @@ void BufferViewer::exportData(const BufferExport &params)
return;
QString filter;
QString title;
if(params.format == BufferExport::CSV)
{
filter = tr("CSV Files (*.csv)");
title = tr("Export buffer to CSV");
}
else if(params.format == BufferExport::RawBytes)
{
filter = tr("Binary Files (*.bin)");
title = tr("Export buffer to bytes");
}
QString filename = RDDialog::getSaveFileName(this, tr("Export buffer to bytes"), QString(),
tr("%1;;All files (*)").arg(filter));
QString filename =
RDDialog::getSaveFileName(this, title, QString(), tr("%1;;All files (*)").arg(filter));
if(filename.isEmpty())
return;