From 148440d0f5845890840b39c146c6da409ad7f99a Mon Sep 17 00:00:00 2001 From: Basil Huber Date: Tue, 17 Feb 2015 18:18:04 +0100 Subject: [PATCH] Changed text in error message Added to ". Please provide a different file name to save to." to the error dialog --- src/QGCApplication.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/QGCApplication.cc b/src/QGCApplication.cc index bd78e6d..afc8889 100644 --- a/src/QGCApplication.cc +++ b/src/QGCApplication.cc @@ -496,12 +496,14 @@ void QGCApplication::saveTempFlightDataLogOnMainThread(QString tempLogfile) if (!saveFilename.isEmpty()) { // if file exsits already, try to remove it first to overwrite it if(QFile::exists(saveFilename) && !QFile::remove(saveFilename)){ + // if the file cannot be removed, prompt user and ask new path 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); } else if(!QFile::copy(tempLogfile, saveFilename)) { + // if file could not be copied, prompt user and ask new path 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