Commit 148440d0 authored by Basil Huber's avatar Basil Huber

Changed text in error message

Added to ". Please provide a different file name to save to." to the error dialog
parent c7ff431e
...@@ -496,12 +496,14 @@ void QGCApplication::saveTempFlightDataLogOnMainThread(QString tempLogfile) ...@@ -496,12 +496,14 @@ void QGCApplication::saveTempFlightDataLogOnMainThread(QString tempLogfile)
if (!saveFilename.isEmpty()) { if (!saveFilename.isEmpty()) {
// if file exsits already, try to remove it first to overwrite it // if file exsits already, try to remove it first to overwrite it
if(QFile::exists(saveFilename) && !QFile::remove(saveFilename)){ if(QFile::exists(saveFilename) && !QFile::remove(saveFilename)){
// if the file cannot be removed, prompt user and ask new path
saveError = true; saveError = true;
QMessageBox::warning (MainWindow::instance(), "File Error","Could not overwrite existing file"); QMessageBox::warning (MainWindow::instance(), "File Error","Could not overwrite existing file.\nPlease provide a different file name to save to.");
QFile::copy(tempLogfile, saveFilename); QFile::copy(tempLogfile, saveFilename);
} else if(!QFile::copy(tempLogfile, saveFilename)) { } else if(!QFile::copy(tempLogfile, saveFilename)) {
// if file could not be copied, prompt user and ask new path
saveError = true; saveError = true;
QMessageBox::warning (MainWindow::instance(), "File Error","Could not create file"); QMessageBox::warning (MainWindow::instance(), "File Error","Could not create file.\nPlease provide a different file name to save to.");
} }
} }
} while(saveError); // if the file could not be overwritten, ask for new file } while(saveError); // if the file could not be overwritten, ask for new file
......
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