Fix regression. Changing dimension value caused an infinite loop.
This commit is contained in:
parent
e714999430
commit
63aba8728b
|
@ -1,5 +1,6 @@
|
||||||
# Version 0.7.43 (unreleased)
|
# Version 0.7.43 (unreleased)
|
||||||
- Improve Windows installer. Avoid crashing on checking if a program is still running.
|
- Improve Windows installer. Avoid crashing on checking if a program is still running.
|
||||||
|
- Fix regression. Changing dimension value caused an infinite loop.
|
||||||
|
|
||||||
# Version 0.7.42 Jan 26, 2021
|
# Version 0.7.42 Jan 26, 2021
|
||||||
- Fix export of pattern recipe.
|
- Fix export of pattern recipe.
|
||||||
|
|
|
@ -3831,8 +3831,11 @@ void MainWindow::PatternChangesWereSaved(bool saved)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void MainWindow::DimensionABaseChanged()
|
void MainWindow::DimensionABaseChanged()
|
||||||
{
|
{
|
||||||
|
const qreal oldValue = m_currentDimensionA;
|
||||||
m_currentDimensionA = dimensionA->currentData().toDouble();
|
m_currentDimensionA = dimensionA->currentData().toDouble();
|
||||||
|
|
||||||
|
if (not VFuzzyComparePossibleNulls(oldValue, m_currentDimensionA))
|
||||||
|
{
|
||||||
const QList<MeasurementDimension_p> dimensions = m->Dimensions().values();
|
const QList<MeasurementDimension_p> dimensions = m->Dimensions().values();
|
||||||
if (dimensions.size() > 1)
|
if (dimensions.size() > 1)
|
||||||
{
|
{
|
||||||
|
@ -3848,29 +3851,39 @@ void MainWindow::DimensionABaseChanged()
|
||||||
|
|
||||||
m_gradation->start();
|
m_gradation->start();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void MainWindow::DimensionBBaseChanged()
|
void MainWindow::DimensionBBaseChanged()
|
||||||
{
|
{
|
||||||
|
const qreal oldValue = m_currentDimensionB;
|
||||||
m_currentDimensionB = dimensionB->currentData().toDouble();
|
m_currentDimensionB = dimensionB->currentData().toDouble();
|
||||||
|
|
||||||
|
if (not VFuzzyComparePossibleNulls(oldValue, m_currentDimensionB))
|
||||||
|
{
|
||||||
const QList<MeasurementDimension_p> dimensions = m->Dimensions().values();
|
const QList<MeasurementDimension_p> dimensions = m->Dimensions().values();
|
||||||
|
|
||||||
if (dimensions.size() > 2)
|
if (dimensions.size() > 2)
|
||||||
{
|
{
|
||||||
MeasurementDimension_p dimension = dimensions.at(2);
|
const MeasurementDimension_p& dimension = dimensions.at(2);
|
||||||
InitDimensionGradation(2, dimension, dimensionC);
|
InitDimensionGradation(2, dimension, dimensionC);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_gradation->start();
|
m_gradation->start();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void MainWindow::DimensionCBaseChanged()
|
void MainWindow::DimensionCBaseChanged()
|
||||||
{
|
{
|
||||||
|
const qreal oldValue = m_currentDimensionC;
|
||||||
m_currentDimensionC = dimensionC->currentData().toDouble();
|
m_currentDimensionC = dimensionC->currentData().toDouble();
|
||||||
|
|
||||||
|
if (not VFuzzyComparePossibleNulls(oldValue, m_currentDimensionC))
|
||||||
|
{
|
||||||
m_gradation->start();
|
m_gradation->start();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void MainWindow::GradationChanged()
|
void MainWindow::GradationChanged()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user