Gui: Do not add non-existing files to open recent menu
This commit is contained in:
committed by
Adrián Insaurralde Avalos
parent
0ea46f03c8
commit
39f76dde67
@@ -941,7 +941,10 @@ void RecentFilesAction::restore()
|
||||
std::vector<std::string> MRU = hGrp->GetASCIIs("MRU");
|
||||
QStringList files;
|
||||
for(const auto& it : MRU) {
|
||||
files.append(QString::fromUtf8(it.c_str()));
|
||||
auto filePath = QString::fromUtf8(it.c_str());
|
||||
if (QFileInfo::exists(filePath)) {
|
||||
files.append(filePath);
|
||||
}
|
||||
}
|
||||
setFiles(files);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user