Skip to content

Commit

Permalink
updateRecentFiles when loading new files removed from here, re #10335
Browse files Browse the repository at this point in the history
also improved some error messages
  • Loading branch information
FedeMPouzols committed Oct 20, 2014
1 parent c8ee45c commit 642f357
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Code/Mantid/MantidPlot/src/ApplicationWindow.cpp
Expand Up @@ -4474,15 +4474,14 @@ void ApplicationWindow::openRecentFile(int index)
if (!f.exists()){
QMessageBox::critical(this, tr("MantidPlot - File Open Error"),//Mantid
tr("The file: <b> %1 </b> <p>does not exist anymore!"
"<p>It will be removed from the list.").arg(fn));
"<p>It will be removed from the list of recent files.").arg(fn));

recentFiles.remove(fn);
updateRecentFilesList(fn);
updateRecentFilesList();
return;
}

loadDataFileByName(fn);
updateRecentFilesList(fn);
saveSettings(); // save new list of recent files
}

Expand All @@ -4496,7 +4495,7 @@ void ApplicationWindow::openRecentProject(int index)
if (!f.exists()){
QMessageBox::critical(this, tr("MantidPlot - File Open Error"),//Mantid
tr("The file: <b> %1 </b> <p>does not exist anymore!"
"<p>It will be removed from the list.").arg(fn));
"<p>It will be removed from the list of recent projects.").arg(fn));

recentProjects.remove(fn);
updateRecentProjectsList();
Expand Down Expand Up @@ -6257,7 +6256,6 @@ void ApplicationWindow::loadDataFile()
if(fn != "") {
loadDataFileByName(fn);
}
updateRecentFilesList(fn);
saveSettings(); // save new list of recent files
}

Expand Down

0 comments on commit 642f357

Please sign in to comment.