Delete previous file name from restore list after save as action.
--HG-- branch : develop
This commit is contained in:
parent
a1bb140bb5
commit
45aebc627e
|
@ -1340,6 +1340,7 @@ bool MainWindow::SaveAs()
|
|||
{
|
||||
fileName += ".val";
|
||||
}
|
||||
const QString oldFileName = curFile;
|
||||
QString error;
|
||||
bool result = SavePattern(fileName, error);
|
||||
if (result == false)
|
||||
|
@ -1352,6 +1353,13 @@ bool MainWindow::SaveAs()
|
|||
messageBox.setStandardButtons(QMessageBox::Ok);
|
||||
messageBox.exec();
|
||||
}
|
||||
if (oldFileName != curFile)
|
||||
{// Now we have new file name after save as.
|
||||
// But still have previous name in restore list. We should delete them.
|
||||
QStringList restoreFiles = qApp->getSettings()->GetRestoreFileList();
|
||||
restoreFiles.removeAll(oldFileName);
|
||||
qApp->getSettings()->SetRestoreFileList(restoreFiles);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user