From f12e9ee4ac0aafdfa0a055aee51e5b6e02ad3102 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 8 Jun 2017 09:39:56 +0300 Subject: [PATCH] Fixed issue #703. Valentina warns about format rewriting for unsaved files. (grafted from c25298f49b2401b67647213dd6543ba880ddf58d) --HG-- branch : develop --- ChangeLog.txt | 1 + src/app/tape/tmainwindow.cpp | 4 ++++ src/app/valentina/mainwindow.cpp | 3 +++ 3 files changed, 8 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index fdd941600..046c0c720 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -18,6 +18,7 @@ - [#698] Problem typing in new axis point for new piece. - [#702] Valentina produces broken shortcut (.lnk) files on Windows. - Changed default behaviour if path to multisize measurements or templates doesn't exist. +- [#703] Valentina warns about format rewriting for unsaved files. # Version 0.5.0 May 9, 2017 - [#581] User can now filter input lists by keyword in function wizard. diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index b62a846e1..36b1b9711 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -364,10 +364,14 @@ void TMainWindow::FileNew() if (mType == MeasurementsType::Standard) { m = new VMeasurements(mUnit, measurements.BaseSize(), measurements.BaseHeight(), data); + m_curFileFormatVersion = VVSTConverter::MeasurementMaxVer; + m_curFileFormatVersionStr = VVSTConverter::MeasurementMaxVerStr; } else { m = new VMeasurements(mUnit, data); + m_curFileFormatVersion = VVITConverter::MeasurementMaxVer; + m_curFileFormatVersionStr = VVITConverter::MeasurementMaxVerStr; } mIsReadOnly = m->IsReadOnly(); diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index f0b290678..2f8cb845c 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -3094,6 +3094,9 @@ void MainWindow::New() mouseCoordinate = new QLabel(QString("0, 0 (%1)").arg(VDomDocument::UnitsToStr(qApp->patternUnit(), true))); ui->toolBarOption->addWidget(mouseCoordinate); + + m_curFileFormatVersion = VPatternConverter::PatternMaxVer; + m_curFileFormatVersionStr = VPatternConverter::PatternMaxVerStr; } else {