Fix incorrect calculation of value for multisize measurements in Valentina.

This commit is contained in:
Roman Telezhynskyi 2021-02-28 14:47:41 +02:00
parent 80b6c97b3a
commit 1b64cba897
3 changed files with 27 additions and 27 deletions

View File

@ -1,3 +1,6 @@
# Version 0.7.46 (unreleased)
- Fix incorrect calculation of value for multisize measurements in Valentina.
# Version 0.7.45 Feb 26, 2021 # Version 0.7.45 Feb 26, 2021
- Fix incorrect seam allowance for angle type second edge right angle. - Fix incorrect seam allowance for angle type second edge right angle.
- Fix regression with country flags. - Fix regression with country flags.

View File

@ -554,20 +554,7 @@ bool MainWindow::LoadMeasurements(const QString &path)
return false; return false;
} }
if (m->Type() == MeasurementsType::Multisize) StoreDimensions();
{
StoreMultisizeMDimensions();
doc->SetPatternWasChanged(true);
emit doc->UpdatePatternLabel();
}
else if (m->Type() == MeasurementsType::Individual)
{
StoreIndividualMDimensions();
doc->SetPatternWasChanged(true);
emit doc->UpdatePatternLabel();
}
return true; return true;
} }
@ -622,20 +609,7 @@ bool MainWindow::UpdateMeasurements(const QString &path, qreal baseA, qreal base
return false; return false;
} }
if (m->Type() == MeasurementsType::Multisize)
{
StoreMultisizeMDimensions();
doc->SetPatternWasChanged(true);
emit doc->UpdatePatternLabel();
}
else if (m->Type() == MeasurementsType::Individual)
{
StoreIndividualMDimensions();
doc->SetPatternWasChanged(true);
emit doc->UpdatePatternLabel();
}
return true; return true;
} }
@ -1998,6 +1972,7 @@ void MainWindow::SyncMeasurements()
statusBar()->showMessage(msg, 5000); statusBar()->showMessage(msg, 5000);
VWidgetPopup::PopupMessage(this, msg); VWidgetPopup::PopupMessage(this, msg);
doc->LiteParseTree(Document::FullLiteParse); doc->LiteParseTree(Document::FullLiteParse);
StoreDimensions();
mChanges = false; mChanges = false;
mChangesAsked = true; mChangesAsked = true;
measurementsSyncTimer->stop(); measurementsSyncTimer->stop();
@ -2230,6 +2205,25 @@ void MainWindow::SetDimensionBases()
SetBase(2, dimensionC, m_currentDimensionC); SetBase(2, dimensionC, m_currentDimensionC);
} }
//---------------------------------------------------------------------------------------------------------------------
void MainWindow::StoreDimensions()
{
if (m->Type() == MeasurementsType::Multisize)
{
StoreMultisizeMDimensions();
doc->SetPatternWasChanged(true);
emit doc->UpdatePatternLabel();
}
else if (m->Type() == MeasurementsType::Individual)
{
StoreIndividualMDimensions();
doc->SetPatternWasChanged(true);
emit doc->UpdatePatternLabel();
}
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
#if defined(Q_OS_MAC) #if defined(Q_OS_MAC)
void MainWindow::OpenAt(QAction *where) void MainWindow::OpenAt(QAction *where)
@ -3920,6 +3914,7 @@ void MainWindow::GradationChanged()
m_currentDimensionA, m_currentDimensionB, m_currentDimensionC)) m_currentDimensionA, m_currentDimensionB, m_currentDimensionC))
{ {
doc->LiteParseTree(Document::FullLiteParse); doc->LiteParseTree(Document::FullLiteParse);
StoreDimensions();
emit sceneDetails->DimensionsChanged(); emit sceneDetails->DimensionsChanged();
} }
else else

View File

@ -413,6 +413,8 @@ private:
QVector<qreal> DimensionRestrictedValues(int index, const MeasurementDimension_p &dimension); QVector<qreal> DimensionRestrictedValues(int index, const MeasurementDimension_p &dimension);
void SetDimensionBases(); void SetDimensionBases();
void StoreDimensions();
}; };
#endif // MAINWINDOW_H #endif // MAINWINDOW_H