Fixed issue #891. Valentina claims that file was incorrectly saved when used
Save as option. (grafted from 1d7f8c80ceb1d7a320eb81d2a7bd726a018e0e05) --HG-- branch : develop
This commit is contained in:
parent
84bb44943f
commit
2989466c52
|
@ -2,6 +2,7 @@
|
|||
- [#885] Regression. Broken support for multi size measurements.
|
||||
- Fixed issues with seam allowance.
|
||||
- [#890] Menu Windows->Close pattern doesn't clear "Group of visibility" list.
|
||||
- [#891] Valentina claims that file was incorrectly saved when used Save as option.
|
||||
|
||||
# Version 0.6.0 October 1, 2018
|
||||
- [#682] New feature. Export increments to Excel .csv.
|
||||
|
|
|
@ -2671,6 +2671,7 @@ void MainWindow::ActionLayout(bool checked)
|
|||
*/
|
||||
bool MainWindow::SaveAs()
|
||||
{
|
||||
const QString oldFilePath = qApp->GetPatternPath();
|
||||
QString filters(tr("Pattern files") + QLatin1String("(*.val)"));
|
||||
QString dir;
|
||||
if (qApp->GetPatternPath().isEmpty())
|
||||
|
@ -2756,6 +2757,14 @@ bool MainWindow::SaveAs()
|
|||
RemoveTempDir();
|
||||
return result;
|
||||
}
|
||||
else if (not oldFilePath.isEmpty())
|
||||
{
|
||||
qCDebug(vMainWindow, "Updating restore file list.");
|
||||
QStringList restoreFiles = qApp->ValentinaSettings()->GetRestoreFileList();
|
||||
restoreFiles.removeAll(oldFilePath);
|
||||
qApp->ValentinaSettings()->SetRestoreFileList(restoreFiles);
|
||||
QFile::remove(oldFilePath + *autosavePrefix);
|
||||
}
|
||||
|
||||
patternReadOnly = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user