Commit 7bf50ed9 authored by Don Gagne's avatar Don Gagne

parent e8e9aa4c
...@@ -98,10 +98,15 @@ void ParameterEditorController::clearRCToParam(void) ...@@ -98,10 +98,15 @@ void ParameterEditorController::clearRCToParam(void)
void ParameterEditorController::saveToFile(const QString& filename) void ParameterEditorController::saveToFile(const QString& filename)
{ {
if (!filename.isEmpty()) { if (!filename.isEmpty()) {
QFile file(filename); QString parameterFilename = filename;
if (!QFileInfo(filename).fileName().contains(".")) {
parameterFilename += QString(".%1").arg(AppSettings::parameterFileExtension);
}
QFile file(parameterFilename);
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
qgcApp()->showMessage(tr("Unable to create file: %1").arg(filename)); qgcApp()->showMessage(tr("Unable to create file: %1").arg(parameterFilename));
return; return;
} }
......
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