Commit a3025df5 authored by Diego F. Asanza's avatar Diego F. Asanza

add file-name (.dsl) extension when saving files with extension missing

parent b8294c12
......@@ -129,10 +129,13 @@ void FileBar::on_actionSave_triggered()
msg.setIcon(QMessageBox::Warning);
msg.exec();
}else {
const QString file_name = QFileDialog::getSaveFileName(
QString file_name = QFileDialog::getSaveFileName(
this, tr("Save File"), "",
tr("DSView Session (*.dsl)"));
if (!file_name.isEmpty()) {
QFileInfo f(file_name);
if(f.suffix().compare("dsl"))
file_name.append(tr(".dsl"));
_session.save_file(file_name.toStdString());
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment