Call autosave only in GUI mode.

This commit is contained in:
Roman Telezhynskyi 2021-07-09 15:31:35 +03:00
parent d280f6a2bb
commit a1d4ea13c4
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# Valentina 0.7.50 (unreleased) # Valentina 0.7.50 (unreleased)
- Fix regression. Minimal seam allowance width is less than the point accuracy values. - Fix regression. Minimal seam allowance width is less than the point accuracy values.
- Call autosave only in GUI mode.
# Valentina 0.7.49 July 1, 2021 # Valentina 0.7.49 July 1, 2021
- Fix crash. - Fix crash.

View File

@ -4372,7 +4372,8 @@ bool MainWindow::SavePattern(const QString &fileName, QString &error)
*/ */
void MainWindow::AutoSavePattern() void MainWindow::AutoSavePattern()
{ {
if (not VAbstractValApplication::VApp()->GetPatternPath().isEmpty() && isWindowModified() && isNeedAutosave) if (VApplication::VApp()->IsGUIMode() && not VAbstractValApplication::VApp()->GetPatternPath().isEmpty()
&& isWindowModified() && isNeedAutosave)
{ {
qCDebug(vMainWindow, "Autosaving pattern."); qCDebug(vMainWindow, "Autosaving pattern.");
QString error; QString error;